1. 程式人生 > >KindEditor、同時繫結多個富文字編輯器

KindEditor、同時繫結多個富文字編輯器

       var options = {  
                filterMode : false,  
                allowImageUpload : true,  
                items : [
                    'source', '|', 'undo', 'redo', '|', 'preview','cut', 'copy', 'paste',
                    'justifyleft', 'justifycenter', 'justifyright',
                    
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'clearhtml', 'quickformat', 'selectall', '/', 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'table', 'hr', 'baidumap', 'pagebreak', 'anchor', 'link', 'unlink', ], cssPath : '', wellFormatMode : true, /* 指定上傳檔案的伺服器端程式。 */ uploadJson : '', /* 指定上傳檔案的伺服器端程式。 */ fileManagerJson :
'', allowFileManager : true, afterCreate : function() { this.sync(); }, afterBlur: function () { this.sync(); } }; var editor = new Array(); KindEditor.ready(function(K) { editor[0] = K.create('textarea[name=""]',options); editor[1] = K.create('textarea[name=""]',options); editor[2] = K.create('textarea[name=""]',options); editor[3] = K.create('textarea[name=""]',options); });