Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 2 weeks ago
TinyMCEditor bug getValue doesn't work
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?
Last updated on Feb, 3rd 2012
You cannot reply to this thread.