Hello,
The TinyMCEditor Addon doesn’t work if i set a custom config. After searching a while i found the answer: in my config I override the setup mothod. In the widget the default config is merged with my config, but not in to deep. This the original Code from vaadin-tinymce-1.4.jar (TinyMCEService.class / public static native loadEditor(…)):
var conf = {
//DEFAULT SETTING...
//...
//AND NOW THE setup-Method
setup : function(ed) {
ed.onChange.add(function(ed, e) {
listener.@org.vaadin.tinymceeditor.widgetset.client.ui.TinyMCEService.OnChangeListener::onChange()();
});
ed.onEvent.add(function(ed, e) {
listener.@org.vaadin.tinymceeditor.widgetset.client.ui.TinyMCEService.OnChangeListener::onEvent(Lcom/google/gwt/dom/client/NativeEvent;)(e);
});
}
};
try {
if(cc) {
var customConfig = eval('('+cc+')');
for(var j in customConfig) {
conf[j]
= customConfig[j]
; //THIS GOES NOT IN TO DEEP SO SETUP WOULD BE OVERRIDEN FROM CUSTOM CONFIG
}
}
} catch (e) {}
$wnd.tinyMCE.init(conf);
As you can see there are problems if my config uses the setup method too. As Workaroud i can only modify the widget at the described lines or there any other Ideas?