The use of ueditor in

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

The original address:

The initial Baidu at “ &rdquo editor;, may supply the choice also has a lot of, the use of more ckeditor, kindeditor, markItUp, ueditor etc.

A start to consider user ckeditor, the project is also used, but also foreign open source a good project, chose ckeditor. The use of a period of time that ckeditor has many places not in line with the Chinese habit, indent 2 Chinese characters, is I most cannot bear. There is, we often use “ insert code ” function, insert the code symbol had escaped.

While the ueditor is consistent with our habits, before the trial, due to a late start, there are a lot of bug, did not choose him. I recently went to ueditor's official website read, update to, try again, a lot of bug correction. So, now with him, well, nonsense ends. The specific method of use:

1 download address, website:  I downloaded.Net UTF-8.

2 after decompression into the project to

3 in you want to use the local call, the first two sections of JS, a configuration, a ueditor


<script src="../Public/ueditor/ueditor.config.js" type="text/javascript"></script>


<script src="../Public/ueditor/ueditor.all.min.js" type="text/javascript"></script>

4 then is the initialization of ueditor, in the following code temp is access database information

1 <div id="myEditor" style="height:500px;"></div>

<script type="text/javascript">


var temp = document.getElementById("<%=hd_content.ClientID %>").value;


var ue = new baidu.editor.ui.Editor();



//Fill in here to change as the editor of the ID control


ue.ready(function () { ue.setContent(temp); })



5 Finally, is the data storage method

1 <asp:Button ID="BtnSave" runat="server" Text="Preservation" onclick="BtnSave_Click" OnClientClick="return getContent();" CssClass="cssbtn" /> 

2 <script type="text/javascript">

function getContent() {


var temp = UE.getEditor('myEditor').getContent();




document.getElementById("<%=hd_content.ClientID %>").value = temp;





Attached: I used to hd_content just to transfer content. In the body form on the line.

1 <asp:HiddenField ID="hd_content" runat="server" Value="" />

Summary: the current version of 1.ueditor, path really don't configuration, the ueditor developers have been well, more convenient than before; the 2..Net version should upload problems, there is a default file compiled, to change the content (if you are a web site), right-click the file attributes, can be found.

Ha ha, ueditor is really good.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Donald at November 17, 2013 - 6:03 PM