Michal Letynski wrote: > > Ok i solved the problem. I used wrong version (1.4.17.3 - its buggy). I > get exceptions: > java.lang.StringIndexOutOfBoundsException: String index out of range: -1 > at java.lang.String.substring(String.java:1937) > at > wicket.contrib.tinymce.settings.TinyMCESettings.lazyLoadTinyMCEResource(TinyMCESettings.java:971) > at > wicket.contrib.tinymce.TinyMceBehavior.renderHead(TinyMceBehavior.java:60) > > And looking and java docs (" TODO: This has not been extensively > tested.") it still under development. >
For TinyMCE to work properly with AJAX, it must be loaded on the page prior to the Ajax call that generates the editor. This is a flaw with TinyMCE itself, not the wicket component. Up until version 1.4.17.2, you needed to render the TinyMCE javascript resource with the Page (or some other non-Ajax generated component) and then individual components can use TinyMCEBehavior on an Ajax rendered text area. This is described in the JavaDoc for lazyLoadTinyMCEResource(). lazyLoadTinyMCEResource() was my attempt to get around this requirement and load the javascript via Ajax. I suspect the problem is not with the technique but with the URL manipulation. Feel free to contribute a bug fix and/or ignore the lazyLoadTinyMCEResource() function. However, it should be considered beta and is completely optional. You can still use the old method. Hope that helps! I still recommend using 1.4.17.3 as it has an up-to-date version of TinyMCE and several other improvements. Jake -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketstuff-tinymce-development-tp3698059p3704257.html Sent from the Users forum 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