Re: wicket-contrib-tinymce problem with multiple editors
Maurice, the issue was fixed in 1.3 only, i'll take a look and fix it in 1.2 branch as well. /iulian On 10/8/07, Maurice Marrink <[EMAIL PROTECTED]> wrote: > > Hi, > > I would like to use wicket-contrib-tinymce in our project but am > having a bit of a problem. > I am using the 1.0 version from sourceforge in our wicket 1.2.x project. > > The problem is that in the html the id of the textarea is set to the > markupid from the component, where TinyMCESettings expects this to be > the the id of the textarea. > > I could override getMarkupId in my textarea if only i did not need > multiple editors on one page. > Because i have one panel with one editor which gets used multiple > times in a single page all my editors will end up with the same id. > > I saw some mails regarding this problem in my mail archive of this > list but either it was not fixed or it was fixed in the wicket 1.3 > branch. > Which we will switch too in due time, but for the moment i am forced > to get this working on wicket 1.2. > > Also the reason this problem has not popped up frequently on this list > makes me wonder if i am missing something or if there simply is no one > else using wicket-contrib-tinymce with wicket 1.2 anymore. > > If this is indeed a bug i would suggest changing the code to use > getMarkupId instead of getId on the registered textareas. > > Thanks, > > Maurice > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: TinyMCE : multiple textarea's with TinyMCEBehaviour
On 9/19/07, Marieke Vandamme <[EMAIL PROTECTED]> wrote: > > > Hello, > > I have 2 textfields who each have the TinyMCEBehaviour, but the first one > is > simple and the other advanced (so they each have a different > TinyMCESettings > in constructor). > This results in getting 4 tinyMCE editing boxes on my page, and the > problem > is because the same 'editor_selector' is used. yes, it happened to me few times but didnt have the time and motivations to look deeper into it. 1/ Can this be changed in the WicketStuff, so that each one gets a different > editor_selector? sure, i'll change that. 2/ Afterwards i want to change the contents in one of the editors. I found > that you could do that with the following statement : > tinyMCE.execCommand('mceSetContent', false,'new text'); > but how can you tell tinyMCE which one of the 2 editor you want to change > the text for? right now there is no support to change the content this way, but let's see how i can do it. Thanks for any help or hints ! > -- > View this message in context: > http://www.nabble.com/TinyMCE-%3A-multiple-textarea%27s-with-TinyMCEBehaviour-tf4481015.html#a12777490 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Wicket-Stuff Tinymce-Editor: No toolbars in IE6
there are two ways to use tinymce: 1) TinyMCEPanel - does add static tinymce capabilities to the page/textarea 2) TinyMCEBehaviour - it is a try to make tinymce/ajax load/work together, but it seems that tinymce library is not ajax ready (if you look at how they lazy-load JS files in background you'll see what i mean, there are all kind of loading/synchronization issues, etc). so far i didnt find a reliable way to load tinymce using ajax, if anybody has any idea, please jump in, i'll be happy to hear. /iulian On 9/14/07, Marieke Vandamme <[EMAIL PROTECTED]> wrote: > > > Well ... it didn't. And the strangest thing is that when working with the > previous CVS sources from tinymce, it does.. Can it have something to do > with those changes for internet explorer or ajax? I can go back to the > previous release, but then internet explorer doesn't work... > > > Marieke Vandamme wrote: > > > > I did some more 'research' on this, and this is what i came up with : > > http://trac.dojotoolkit.org/ticket/233 > > I'm using a dojodatepicker on the same page of my tinymcepanel. > > I haven't checked if the position of the js-includes will solve my > > problem, but i hope so.. > > > > > > Iulian Costan wrote: > >> > >> my guess is that you load tinymce using ajax, where tinymce area is > >> placed > >> in a panel that is loaded dynamically. > >> if the above is true then there (TinymceBehaviour constructor) is a > >> boolean > >> parameter called 'ajax' that you have to set to true. > >> > >> /iulian > >> > >> On 9/14/07, Marieke Vandamme <[EMAIL PROTECTED]> wrote: > >>> > >>> > >>> Hello, > >>> > >>> I had the same problem with tinymce in internet explorer. I was glad > to > >>> read > >>> this thread and downloaded the latest sources from CVS. But now I get > a > >>> firefox error saying : tinyMCE.baseURL has no properties > >>> (tiny_mce_src.js:88). Am i the only one getting this error or is it a > >>> common > >>> error? > >>> > >>> > >>> Iulian Costan wrote: > >>> > > >>> > the fix is committed, let me know if is works as expected. > >>> > > >>> > good to be back to wicket ;) > >>> > > >>> > /iulian > >>> > > >>> > On 9/10/07, Benjamin Ernst <[EMAIL PROTECTED]> wrote: > >>> >> > >>> >> Hi, > >>> >> > >>> >> I solved the problem by changing the TinyMceBehavior.renderHead > >>> ()-method. > >>> >> > >>> >> It now looks like this: > >>> >> > >>> >> /** > >>> >> * @see > >>> org.apache.wicket.behavior.AbstractAjaxBehavior#renderHead( > >>> >> org.apache.wicket.markup.html.IHeaderResponse) > >>> >> */ > >>> >> public void renderHead(IHeaderResponse response) > >>> >> { > >>> >> // add wicket-ajax support > >>> >> super.renderHead(response); > >>> >> > >>> >> // since wicket modifies the src attribute of a pre-loaded > >>> script > >>> >> tag > >>> >> // then we > >>> >> // need this workaround to safely import tinymce script > >>> >> > >>> >> // import script > >>> >> // IS NOT NEEDED ANY LONGER > >>> >> //StringBuilder importBuilder = new StringBuilder(); > >>> >> //importBuilder.append("var script = document.createElement > >>> >> ('script');\n"); > >>> >> //importBuilder.append("script.id='tinyMCEScript';\n"); > >>> >> //importBuilder.append("script.src='" + > >>> >> RequestCycle.get().urlFor(reference) > >>> >> + "';\n"); > >>> >> //importBuilder.append("script.type='text/javascript';\n"); > >>> >> //importBuilder.append("document.getElementsByTagName > >>> >> ('head')[0].appendChild(script);\n"); > >>> >> //response.renderJavascript(importBuilder.toString(), > >>> "import"); >
Re: Wicket-Stuff Tinymce-Editor: No toolbars in IE6
my guess is that you load tinymce using ajax, where tinymce area is placed in a panel that is loaded dynamically. if the above is true then there (TinymceBehaviour constructor) is a boolean parameter called 'ajax' that you have to set to true. /iulian On 9/14/07, Marieke Vandamme <[EMAIL PROTECTED]> wrote: > > > Hello, > > I had the same problem with tinymce in internet explorer. I was glad to > read > this thread and downloaded the latest sources from CVS. But now I get a > firefox error saying : tinyMCE.baseURL has no properties > (tiny_mce_src.js:88). Am i the only one getting this error or is it a > common > error? > > > Iulian Costan wrote: > > > > the fix is committed, let me know if is works as expected. > > > > good to be back to wicket ;) > > > > /iulian > > > > On 9/10/07, Benjamin Ernst <[EMAIL PROTECTED]> wrote: > >> > >> Hi, > >> > >> I solved the problem by changing the TinyMceBehavior.renderHead > ()-method. > >> > >> It now looks like this: > >> > >> /** > >> * @see org.apache.wicket.behavior.AbstractAjaxBehavior#renderHead( > >> org.apache.wicket.markup.html.IHeaderResponse) > >> */ > >> public void renderHead(IHeaderResponse response) > >> { > >> // add wicket-ajax support > >> super.renderHead(response); > >> > >> // since wicket modifies the src attribute of a pre-loaded > script > >> tag > >> // then we > >> // need this workaround to safely import tinymce script > >> > >> // import script > >> // IS NOT NEEDED ANY LONGER > >> //StringBuilder importBuilder = new StringBuilder(); > >> //importBuilder.append("var script = document.createElement > >> ('script');\n"); > >> //importBuilder.append("script.id='tinyMCEScript';\n"); > >> //importBuilder.append("script.src='" + > >> RequestCycle.get().urlFor(reference) > >> + "';\n"); > >> //importBuilder.append("script.type='text/javascript';\n"); > >> //importBuilder.append("document.getElementsByTagName > >> ('head')[0].appendChild(script);\n"); > >> //response.renderJavascript(importBuilder.toString(), > "import"); > >> > >> // THE NEW LINE > >> response.renderJavascriptReference(reference); > >> > >> // init script > >> StringBuilder initBuilder = new StringBuilder(); > >> initBuilder.append("tinyMCE.init({" + settings.toJavaScript > (ajax) > >> + > >> "\n});\n"); > >> initBuilder.append(settings.getLoadPluginJavaScript()); > >> initBuilder.append(settings.getAdditionalPluginJavaScript()); > >> response.renderJavascript(initBuilder.toString(), "init"); > >> } > >> > >> > >> I don´t really know why the script was not imported this way. > >> But now it works fine in IE6. > >> > >> > >> Benjamin > >> > >> 2007/9/3, Benjamin Ernst <[EMAIL PROTECTED]>: > >> > > >> > Hi Iulian, > >> > > >> > I just want to check if there is any progress with this issue? Did > you > >> > find anything? > >> > > >> > Benjamin > >> > > >> > 2007/8/21, Iulian Costan <[EMAIL PROTECTED]>: > >> > > > >> > > hey guys, > >> > > > >> > > i am supposed to be the maintainer of tinymce module but lately i > >> didnt > >> > > put > >> > > much effort into it. > >> > > let me take a look and see how i can fix that issue. > >> > > > >> > > /iulian > >> > > > >> > > On 8/21/07, Benjamin Ernst < [EMAIL PROTECTED]> wrote: > >> > > > > >> > > > Hi Thijs, > >> > > > Thank you for opening the JIRA. At least there is someone who has > >> the > >> > > same > >> > > > error. > >> > > > > >> > > > So let's hope for the best. > >> > > > > >> > > > Benjamin > >> > > > > >> > > > 2007/8/20, Thijs <[EMAIL PROTECTED]>: &g
Re: Wicket-Stuff Tinymce-Editor: No toolbars in IE6
the fix is committed, let me know if is works as expected. good to be back to wicket ;) /iulian On 9/10/07, Benjamin Ernst <[EMAIL PROTECTED]> wrote: > > Hi, > > I solved the problem by changing the TinyMceBehavior.renderHead()-method. > > It now looks like this: > > /** > * @see org.apache.wicket.behavior.AbstractAjaxBehavior#renderHead( > org.apache.wicket.markup.html.IHeaderResponse) > */ > public void renderHead(IHeaderResponse response) > { > // add wicket-ajax support > super.renderHead(response); > > // since wicket modifies the src attribute of a pre-loaded script > tag > // then we > // need this workaround to safely import tinymce script > > // import script > // IS NOT NEEDED ANY LONGER > //StringBuilder importBuilder = new StringBuilder(); > //importBuilder.append("var script = document.createElement > ('script');\n"); > //importBuilder.append("script.id='tinyMCEScript';\n"); > //importBuilder.append("script.src='" + > RequestCycle.get().urlFor(reference) > + "';\n"); > //importBuilder.append("script.type='text/javascript';\n"); > //importBuilder.append("document.getElementsByTagName > ('head')[0].appendChild(script);\n"); > //response.renderJavascript(importBuilder.toString(), "import"); > > // THE NEW LINE > response.renderJavascriptReference(reference); > > // init script > StringBuilder initBuilder = new StringBuilder(); > initBuilder.append("tinyMCE.init({" + settings.toJavaScript(ajax) > + > "\n});\n"); > initBuilder.append(settings.getLoadPluginJavaScript()); > initBuilder.append(settings.getAdditionalPluginJavaScript()); > response.renderJavascript(initBuilder.toString(), "init"); > } > > > I don´t really know why the script was not imported this way. > But now it works fine in IE6. > > > Benjamin > > 2007/9/3, Benjamin Ernst <[EMAIL PROTECTED]>: > > > > Hi Iulian, > > > > I just want to check if there is any progress with this issue? Did you > > find anything? > > > > Benjamin > > > > 2007/8/21, Iulian Costan <[EMAIL PROTECTED]>: > > > > > > hey guys, > > > > > > i am supposed to be the maintainer of tinymce module but lately i > didnt > > > put > > > much effort into it. > > > let me take a look and see how i can fix that issue. > > > > > > /iulian > > > > > > On 8/21/07, Benjamin Ernst < [EMAIL PROTECTED]> wrote: > > > > > > > > Hi Thijs, > > > > Thank you for opening the JIRA. At least there is someone who has > the > > > same > > > > error. > > > > > > > > So let's hope for the best. > > > > > > > > Benjamin > > > > > > > > 2007/8/20, Thijs <[EMAIL PROTECTED]>: > > > > > > > > > > He Benjamin, > > > > > > > > > > I have the same problem. I have opened a JIRA issue for it: > > > > > http://wicketstuff.org/jira/browse/WCTINYMCE-2 But no response so > > > far. I > > > > > can't help you any further but lets hoop the maintainer of the > > > tinymce > > > > > project picks it up... > > > > > > > > > > Thijs > > > > > > > > > > Benjamin Ernst wrote: > > > > > > Hi, > > > > > > > > > > > > has nobody an idea? Any help would be great! > > > > > > > > > > > > Thanks, > > > > > > Benjamin > > > > > > > > > > > > 2007/8/16, Benjamin Ernst <[EMAIL PROTECTED]>: > > > > > > > > > > > >> Hi, > > > > > >> > > > > > >> I have a problem with the wicket-stuff Tinymce-Editor in the > > > > > >> InternetExplorer: > > > > > >> > > > > > >> the first time the page is loaded, there are no tool-icons, > just > > > the > > > > > >> text-area. And IE gives the following Error: > > > > > >> > > > > > >> Error: 'tinyMCE is undefined' > > > > > >> > > > > > >> It' s an Java-Sc
Re: Wicket-Stuff Tinymce-Editor: No toolbars in IE6
hey, sorry for this late response, i've just read this thread. the reason behind all those tricky imports is the tinymce/ajax compatibility. tinymce works very well when it is loaded at the same time with parent page but when you try to load it using ajax then there is a problem. anyway tinymce/ajax loading is experimental and shouldn't be used, i'll put some comments in there and clean up little bit. /iulian On 9/10/07, Benjamin Ernst <[EMAIL PROTECTED]> wrote: > > Hi, > > I solved the problem by changing the TinyMceBehavior.renderHead()-method. > > It now looks like this: > > /** > * @see org.apache.wicket.behavior.AbstractAjaxBehavior#renderHead( > org.apache.wicket.markup.html.IHeaderResponse) > */ > public void renderHead(IHeaderResponse response) > { > // add wicket-ajax support > super.renderHead(response); > > // since wicket modifies the src attribute of a pre-loaded script > tag > // then we > // need this workaround to safely import tinymce script > > // import script > // IS NOT NEEDED ANY LONGER > //StringBuilder importBuilder = new StringBuilder(); > //importBuilder.append("var script = document.createElement > ('script');\n"); > //importBuilder.append("script.id='tinyMCEScript';\n"); > //importBuilder.append("script.src='" + > RequestCycle.get().urlFor(reference) > + "';\n"); > //importBuilder.append("script.type='text/javascript';\n"); > //importBuilder.append("document.getElementsByTagName > ('head')[0].appendChild(script);\n"); > //response.renderJavascript(importBuilder.toString(), "import"); > > // THE NEW LINE > response.renderJavascriptReference(reference); > > // init script > StringBuilder initBuilder = new StringBuilder(); > initBuilder.append("tinyMCE.init({" + settings.toJavaScript(ajax) > + > "\n});\n"); > initBuilder.append(settings.getLoadPluginJavaScript()); > initBuilder.append(settings.getAdditionalPluginJavaScript()); > response.renderJavascript(initBuilder.toString(), "init"); > } > > > I don´t really know why the script was not imported this way. > But now it works fine in IE6. > > > Benjamin > > 2007/9/3, Benjamin Ernst <[EMAIL PROTECTED]>: > > > > Hi Iulian, > > > > I just want to check if there is any progress with this issue? Did you > > find anything? > > > > Benjamin > > > > 2007/8/21, Iulian Costan <[EMAIL PROTECTED]>: > > > > > > hey guys, > > > > > > i am supposed to be the maintainer of tinymce module but lately i > didnt > > > put > > > much effort into it. > > > let me take a look and see how i can fix that issue. > > > > > > /iulian > > > > > > On 8/21/07, Benjamin Ernst < [EMAIL PROTECTED]> wrote: > > > > > > > > Hi Thijs, > > > > Thank you for opening the JIRA. At least there is someone who has > the > > > same > > > > error. > > > > > > > > So let's hope for the best. > > > > > > > > Benjamin > > > > > > > > 2007/8/20, Thijs <[EMAIL PROTECTED]>: > > > > > > > > > > He Benjamin, > > > > > > > > > > I have the same problem. I have opened a JIRA issue for it: > > > > > http://wicketstuff.org/jira/browse/WCTINYMCE-2 But no response so > > > far. I > > > > > can't help you any further but lets hoop the maintainer of the > > > tinymce > > > > > project picks it up... > > > > > > > > > > Thijs > > > > > > > > > > Benjamin Ernst wrote: > > > > > > Hi, > > > > > > > > > > > > has nobody an idea? Any help would be great! > > > > > > > > > > > > Thanks, > > > > > > Benjamin > > > > > > > > > > > > 2007/8/16, Benjamin Ernst <[EMAIL PROTECTED]>: > > > > > > > > > > > >> Hi, > > > > > >> > > > > > >> I have a problem with the wicket-stuff Tinymce-Editor in the > > > > > >> InternetExplorer: > > > > > >> > > > > > >> the first time t
Re: Wicket-Stuff Tinymce-Editor: No toolbars in IE6
hey guys, i am supposed to be the maintainer of tinymce module but lately i didnt put much effort into it. let me take a look and see how i can fix that issue. /iulian On 8/21/07, Benjamin Ernst <[EMAIL PROTECTED]> wrote: > > Hi Thijs, > Thank you for opening the JIRA. At least there is someone who has the same > error. > > So let's hope for the best. > > Benjamin > > 2007/8/20, Thijs <[EMAIL PROTECTED]>: > > > > He Benjamin, > > > > I have the same problem. I have opened a JIRA issue for it: > > http://wicketstuff.org/jira/browse/WCTINYMCE-2 But no response so far. I > > can't help you any further but lets hoop the maintainer of the tinymce > > project picks it up... > > > > Thijs > > > > Benjamin Ernst wrote: > > > Hi, > > > > > > has nobody an idea? Any help would be great! > > > > > > Thanks, > > > Benjamin > > > > > > 2007/8/16, Benjamin Ernst <[EMAIL PROTECTED]>: > > > > > >> Hi, > > >> > > >> I have a problem with the wicket-stuff Tinymce-Editor in the > > >> InternetExplorer: > > >> > > >> the first time the page is loaded, there are no tool-icons, just the > > >> text-area. And IE gives the following Error: > > >> > > >> Error: 'tinyMCE is undefined' > > >> > > >> It' s an Java-Script-Error and it might be, that the scripts are not > > >> loaded the right way. But I don´t know how to fix this. Here are the > > scripts > > >> from generated the HTML-Source: > > >> > > >> id="import">]]>*/ > > >> > > >> ]]>*/ > > >> > > >> Sometimes when the page is loaded again, the tool-icons are there. In > > >> FireFox it works fine, but unfortunately I have to use IE for this > > project. > > >> > > >> Thanks in advance, > > >> Benjamin > > >> > > >> > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >