テキストボックスがあり、そこにいくつかのテキストが書かれています。さて、誰かがテキストボックス内をクリックすると、htmlエディター(http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.HtmlEditor)を開きます。ユーザーが簡単に編集して保存できるように、テキストボックス内に記述されたテキストをHTMLエディターに配置します。同様に、htmlエディターを開いたときに、カラーボックス内の値とhtmlエディターのfont-sizeおよびfont-valueを更新したいと思います。これらの値をテキストボックスから取得できると仮定します。グーグルしてみましたが、どうすればいいのかわかりませんでした。
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エディタのフィールドにアクセスしてその値を設定する方法。