I. Configuration method 1. Download the. NET version of Ueditor after the extract is put into the project folder. 2. Add "Newtonsoft" to the project. Json.dll "Reference 3. Configure the URL for your project path in the Ueditor configuration file (/ueditor/editor_config.js)
//Add a path to the editor instance, this cannot be commented
ueditor_home_url:/ueditor/
4. Reference the JS file on the page that needs to use Ueditor
<script type= "Text/javascript" src= ". /ueditor/ueditor.config.js "></script>
<script type= "Text/javascript" src= ". /ueditor/ueditor.all.js "></script>
<link rel= "stylesheet" href= ". /editor/themes/default/dialogbase.css "/>
5. Call Ueditor on pages that need to use Ueditor
<textarea id= "myeditor" name= "Myeditor" runat= "Server" onblur= "Setueditor ()" style= "width:1030px;
height:250px; "disabled=" Disabled "></textarea>
<script type= "Text/javascript" >
var editor = new Baidu.editor.ui.Editor ();
Editor.render ("<%=myeditor. Clientid%> ");
</script>
Note: The red part is the ID of the control that called Ueditor
Two. How to operate 1. Set read-only
var ue=new UE.ui.Editor ({readonly:true,})
2. Get the contents of Ueditor
String text= server.htmldecode ( myeditor. InnerHtml);
3. Modify the toolbar
var ue= new Baidu.editor.ui.Editor ({toolbars: [' Bold ', ' undo ', ' Redo ']});
Enter the toolbar control you want in square brackets, and if [] leave blank, the toolbar is not displayed and can be used for simple viewing
Using Ueditor in ASP.