代码
var ueInfoContentConfig = { UEDITOR_HOME_URL:"@(curGlobalResPath +"/ueditor/")", toolbars: [ ['fullscreen', 'source', 'undo', 'redo', 'bold', 'italic', 'underline', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', 'customstyle', 'insertcode', 'kityformula', 'preview'] ] }
调用
var htmlContent = $(this).html(); var myEditor = $("<script id='myEditor' type='text/plain' style='width:1024px;height:100px;'>" + htmlContent + "<\/script>"); $(this).html("").append(myEditor); UE.getEditor('myEditor', ueArtileContentConfig);