Hi. I have a problem with this example code:
tinyMceBehavior = new TinyMceBehavior();
PropertyModel<Boolean> richProperty = new PropertyModel(model, "rich");
add(new AjaxCheckBox("switchRte", richProperty) {
@Override
protected void onUpdate(AjaxRequestTarget target) {
if (getModelObject()) {
textArea.add(tinyMceBehavior);
} else {
textArea.remove(tinyMceBehavior);
tinyMceBehavior = new TinyMceBehavior();
}
refresh(target);
}
});
the purpose is to have a checkbox that add and remove the
TinyMceBehavior from a text area.
It works fine but I have this problem: when I Submit the form the
textArea is in after REMOVING the behavior, I have a javascript error:
t.win.document is null
firebug show the error in tiny_mce_src.js at line 5376
if (!r)
r = isIE ? t.win.document.body.createTextRange() :
t.win.document.createRange();
I am using tinymce 3.2.7 but the same problem occurs with tinymce used
in trunk version of wicket-contrib-tinymce.
the effect is that "submit" does not work.
if I click on checkbox again, everything continue to work.
Any idea?
--
Daniele Dellafiore
http://blog.ildella.net
http://twitter.com/ildella
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]