easyui-dialog中無法顯示KindEditor外掛程式

來源:互聯網
上載者:User
easyui-dialog中無法顯示KindEditor外掛程式

KindEditor是一種用起來還不錯的富文字編輯器外掛程式;easyui是一個前端外掛程式,其中有一個彈出框功能——dialog。在實際使用的時候,我們需要在彈出框當中展示富文字編輯器,從而進行編輯和儲存功能,再進行背景操作。但是我在使用easyui的彈出框的時候出現了問題,無法顯示kindeditor外掛程式,而不在dialog中使用時候是可以顯示的,這是為什麼。要怎麼解決。 問題發生的原因
dialog在彈出框時的初始化操作,沒有成功初始化KindEditor 解決方式
在easyui的dialog初始化的onOpen方法中來初始化kindeditor:
$(‘#list1’).dialog({
onOpen: function(){
editor1 = KindEditor.create(‘#summary1’, {
height :”300px”,
uploadJson : ‘../cycx/picFtpUpload.do’,
afterBlur: function () {
this.sync();
},
filterMode: true,//是否開啟過濾模式
allowFileManager: true,
afterChange : function() {
},
onBeforeClose: function (event, ui) {
// 關閉Dialog前移除編輯器
editor1.remove(‘#summary1’);
},
items : [ ‘source’, ‘|’, ‘undo’, ‘redo’, ‘|’, ‘cut’, ‘copy’, ‘paste’,
‘plainpaste’, ‘wordpaste’, ‘|’, ‘justifyleft’, ‘justifycenter’, ‘justifyright’,
‘justifyfull’, ‘subscript’,
‘superscript’, ‘quickformat’, ‘|’,
‘formatblock’, ‘fontname’, ‘fontsize’, ‘|’, ‘/’,’forecolor’, ‘hilitecolor’, ‘bold’,
‘italic’, ‘underline’, ‘strikethrough’, ‘lineheight’, ‘removeformat’, ‘|’, ‘image’,
‘table’, ‘hr’, ‘pagebreak’,
‘link’, ‘unlink’, ‘about’, ‘|’]
});
},
onClose:function(){
editor1.remove(‘#summary1’);
},
modal: true
});
參考文章:http://blog.csdn.net/qinnimei/article/details/77319684

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.