PDA

View Full Version : HtmlEditor help ?



itlvk
7 Aug 2010, 8:07 AM
I'm using HtmlEditor, I need set view html source



commentEditor = new Ext.form.HtmlEditor({
id: 'Comment',
fieldLabel: 'Comment',
width: '98%',
height: 180
});
commentEditor.toggleSourceEdit(true);
When run, error:



Message: 'this.tb' is null or not an object
Line: 11
Char: 107410
Code: 0
URI: http://localhost:57375/Scripts/Framework/ext-all.js
What is error ?
How to fix it ?

please help me, many thanks

Condor
7 Aug 2010, 9:31 AM
You can't call toggleSourceEdit before the component is rendered. Move the call to toggleSourceEdit to the render listener.