Hi, All, I have a requirement on ckedit. each time I invoke the ckedit instance in page, i will pass a parameter to the ckedit instance: contentdirection , then according to this parameter , I need to dynamic config the ckedit's attribute by the following java function, But it does not work. can any body help me how to dynamic config ckedit instance's confguration?
/**
* Enables the CKEditor with all text editing options.
*/
private native void enableEditor(String dir) /*-{
if(dir=="RTL"){
$wnd.CKEDITOR.replace(@com.drutt.producer.ui.client.constants.ComponentIds::TEXT_TOOL_EDITOR_ID,{contentsLangDirection:'rtl'});
}else{
$wnd.CKEDITOR.replace(@com.drutt.producer.ui.client.constants.ComponentIds::TEXT_TOOL_EDITOR_ID,{contentsLangDirection:'ltr'});
}
var editor = $wnd.CKEDITOR.instances[@com.drutt.producer.ui.client.constants.ComponentIds::TEXT_TOOL_EDITOR_ID];
if(editor.mode == "source"){
editor.setMode('wysiwyg');
}
}-*/;
/**
* Enables the CKEditor with all text editing options.
*/
private native void enableEditor(String dir) /*-{
if(dir=="RTL"){
$wnd.CKEDITOR.replace(@com.drutt.producer.ui.client.constants.ComponentIds::TEXT_TOOL_EDITOR_ID,{contentsLangDirection:'rtl'});
}else{
$wnd.CKEDITOR.replace(@com.drutt.producer.ui.client.constants.ComponentIds::TEXT_TOOL_EDITOR_ID,{contentsLangDirection:'ltr'});
}
var editor = $wnd.CKEDITOR.instances[@com.drutt.producer.ui.client.constants.ComponentIds::TEXT_TOOL_EDITOR_ID];
if(editor.mode == "source"){
editor.setMode('wysiwyg');
}
}-*/;