Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function refreshHtml(html){
- editor.clickToolbar('source');
- editor.html(html);
- editor.clickToolbar('source');
- // $("textarea[name='content']").html("");
- }
- function clearHtml(){
- editor.html("");
- // $("textarea[name='content']").html("");
- }
- //富文本编辑器
- var editor;
- KindEditor.ready(function(K) {
- editor = K.create('textarea[name="content"]', {
- cssPath : '<%=basePath%>js/kindeditor/plugins/code/prettify.css',
- uploadJson : '<%=basePath%>js/kindeditor/jsp/upload_json.jsp',
- fileManagerJson : '<%=basePath%>js/kindeditor/jsp/file_manager_json.jsp',
- allowFileManager : false,
- allowImageRemote : false,
- afterBlur : function() {
- this.sync();
- },
- items : [
- 'source', '|', 'preview', '|', 'justifyleft', 'justifycenter', 'justifyright',
- 'justifyfull', 'clearhtml', 'quickformat', '|',
- 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
- 'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|',
- 'hr', 'emoticons', 'anchor', 'link', 'unlink'
- ]
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement