Well, that's what I meant with "preloading". You cannot use TinyMCE if you're
loading its javascripts from your ajax request. If the TinyMCE scripts are
loaded from the containing page, then it will work (as you say).


nino martinez wael wrote:
> 
> Actually AFAIK the resources just need to be on path, then you can pretty
> much do whatever you want. Could be what your definition of preloading are
> :)
> 
> I have a panel that are added by ajax so I had to make sure the resources
> used by that panel always where on the containing page.
> 
> regards
> 
> 2009/9/30 bgooren <b...@iswd.nl>
> 
>>
>> It's not possible to add TinyMCE dynamically due to the way TinyMCE
>> works.
>> What you can do however, is pre-load TinyMCE, and dynamically
>> enable/disable
>> it on a component.
>>
>> Daniele Dellafiore wrote:
>> >
>> > 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: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-tinymce--problem-adding-removing-TinyMceBehavior-dinamically-tp25681833p25682644.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-tinymce--problem-adding-removing-TinyMceBehavior-dinamically-tp25681833p25683255.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to