我是新來的EXT-JS和我已經得到了從GitHub的一些插件一個HTML編輯器,現在我已經有了一個應該彈出的編輯按鈕一個包含文本區域內容的警告框。獲取編輯內容 - 分機JS的HTML編輯器
Ext.onReady(function() {
Ext.tip.QuickTipManager.init();
var top = Ext.create('Ext.form.Panel', {
frame:true,
title: 'HtmlEditor plugins',
bodyStyle: 'padding:5px 5px 0',
//width: 300,
fieldDefaults: {
labelAlign: 'top',
msgTarget: 'side'
},
items: [{
xtype: 'htmleditor',
fieldLabel: 'Text editor',
height: 300,
plugins: [
Ext.create('Ext.ux.form.plugin.HtmlEditor',{
enableAll: true
,enableMultipleToolbars: true
})
],
anchor: '100%'
}],
buttons: [{
text: 'Save'
},{
text: 'Cancel'
}]
});
top.render(document.body);
});
我知道我應該添加
handler:function(){alert(someextjscodehere)}
,但我不知道函數返回它,我也可以找到它的谷歌...
你確定你需要的插件?基本的HtmlEditor存在於Ext中,插件只是添加了一些功能。 – rixo
是的,我確定。原始編輯器沒有表格,撤消,重做...功能。 –