0

別のテキストエリアでHtmlEditorのソースコードモードウィンドウをデタッチまたはプロモートするにはどうすればよいですか?つまり、HtmlEditorで入力するときのソースコードは、別のtextarea要素にどのように表示されるのでしょうか。

HtmlEditorでフォームを作成し、Textareaでフォームを作成します。listnerを'textareafield'にアタッチし、ソースモードでHtmlEditor textareaからデータを取得する必要があると思いますが、作成方法がわかりません。

{
    xtype: 'htmleditor',
    listeners: {
       }
    },

 ...

  {
    xtype: 'form',
    layout: {
      type: 'fit'
    },
    title: 'Source Code',
    flex: 1,
    items: [
    {
      xtype: 'textareafield',
      id:'textareaEl'
    }
    ]
  }
4

2 に答える 2

0

標準部品にはこんなものはないと思います。自分でテキスト領域を作成し、からのデータで定期的に更新できると思いますhtmleditor

于 2012-03-22T21:25:49.123 に答える
0

やった)

  {
    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-23T05:05:15.030 に答える