0
我有一個文本框,並且上面寫有一些文本。現在,當有人在文本框內單擊時,我打開一個HTML編輯器(http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.HtmlEditor),現在我想將文本框內寫入的文本放入HTML編輯器,以便用戶可以輕鬆進行編輯並保存。同樣,當我打開html編輯器時,我想更新HTML編輯器中顏色框和font-size和font-value內的值。假設我可以從文本框中獲取這些值。我嘗試使用Google搜索,但無法找到如何做到這一點。設置屬性extJs htmleditor
Ext.QuickTips.init(); // enable tooltips
new Ext.Panel({
renderTo: 'text-editor',
id: 'html-editor',
width: 440,
height: 100,
frame: true,
layout: 'fit',
items: [
{
xtype: 'htmleditor',
enableColors: true,
enableAlignments: true
}
]
});
$('#selected-text-box').click(function() {
showEditor(this.id);
//TODO: Write code here to set the properties of editor with the properties set in textbox
});
現在,我只是想問。如何訪問html編輯器的字段並設置它們的值。
谷歌搜索很好。就代碼而言,你嘗試過什麼? – sha
更新了代碼。我面臨的主要問題是在我的文本框中根據字體大小設置htmleditor的字體大小。 – sachinjain024