如何在另一个文本区中分离或升级HtmlEditor的源代码模式窗口?我的意思是,当输入HtmlEditor时,源代码如何显示在另一个文本区域元素中?
我使用HtmlEditor创建表单,使用Textarea创建表单,我假设有必要将listner附加到'textareafield‘,并在源模式下从HtmlEditor文本区域获取数据,但不知道如何创建。
{
xtype: 'htmleditor',
listeners: {
}
},
...
{
xtype: 'form',
layout: {
type: 'fit'
},
title: 'Source Code',
flex: 1,
items: [
{
xtype: 'textareafield',
id:'textareaEl'
}
]
}
发布于 2012-03-23 13:05:15
我做到了)
{
xtype: 'htmleditor',
id:'seditor',
listeners: {
render: function(){
this.textareaEl.on('keydown', function() {
this.fireEvent('sync', this, this.textareaEl.getValue());
}, this, { buffer: 2 });
},
sync: function(sender, html){
}
},
style: 'background-color: white;',
hideLabel: true,
labelPad: 0
}
发布于 2012-03-23 05:25:49
我不认为在标准组件中有这样的东西。我想你可以自己创建文本区,并用来自htmleditor
的数据定期更新它。
https://stackoverflow.com/questions/9825774
复制相似问题