HTML エディター内にテキストを入力するときに、チェック ボックスをオンにする必要があります。以下のコードは、HTML エディタ ツールバーのソース編集ボタンをクリックすると正常に動作します。すべてのボタンが無効になった後、チェックボックスがオンになります。誰でもコードを修正できますか?
extjs コードは次のとおりです。
this.mcmServiceIndicatorsOthCheckbox = new Ext.form.field.Checkbox({ fieldLabel: '', id: 'otherbox', boxLabel: 'OTH (must complete comments)' });
this.mcmServiceIndicatorsCommentsHtmlEditor = new Ext.form.HtmlEditor({
height: 50,
style: 'background-color: white;',
enableSourceEdit : true,
anchor: '100%',
listeners: {
afterrender: function(){
this.textareaEl.on('keyup', function() {
var notes = this.getValue();
if(notes.length > 0)
{
Ext.getCmp('otherbox').setValue(true);
}
else
{
Ext.getCmp('otherbox').setValue(false);
}
});
}
}
});