Re: TinyMCE in an Ajax loaded panel

2009-09-30 Thread Daniele Dellafiore
On Thu, Nov 27, 2008 at 5:57 PM, Martijn Lindhout
mlindh...@jointeffort.nl wrote:

 Hi all,

 I searched nabble, but couldn't find any recent posts that brought me a
 solution to this problem:

 I have a page with two panels, a master/detail setup. The master has a list
 of items, the detail a TinyMCE editor. The details panel is invisible until
 the user clicks an item in the master list. The list disappears and the
 detail panel is shown, all using Ajax. The problem is that the TinyMCE
 editor doesn't appear, it's just a normal textarea.

 Has anyone a solution to this problem?

 Thanks

yes, I had this problem and I solved this. I wrote about this here:
http://wicketbyexample.com/wicket-tinymce-some-advanced-tips/

specifically in the paragraph Switching to Rich Text after the page is load

it is all working now but I have a problem with the checkbox that
enable/disable the behavior. I am going to write on this mailing list
for help about that.

--
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



RE: TinyMCE in an Ajax loaded panel

2009-08-27 Thread Martin Heras
);
   }
 
   /**
* @see
 wicket.contrib.tinymce.TinyMceBehavior#getRenderOnDomReadyJavascript(org
 .apache.wicket.markup.html.IHeaderResponse)
*/
   @Override
   protected String getRenderOnDomReadyJavascript(IHeaderResponse
 response)
   {
   if (getComponent() == null)
   throw new IllegalStateException(TinyMceBehavior
 is not bound to a component);
   if
 (response.getClass().getName().endsWith(AjaxHeaderResponse))
   return tinyMCE.execCommand('mceAddControl',
 false, ' + getComponent().getMarkupId()
   + ');;
 
   return null;
   }
 }
 
 
   return new AjaxCallDecorator()
   {
   private static final long serialVersionUID = 1L;
 
   /**
* @see
 org.apache.wicket.ajax.calldecorator.AjaxCallDecorator#decorateScript(ja
 va.lang.CharSequence)
*/
   @Override
   public CharSequence decorateScript(CharSequence
 script)
   {
   StringBuilder buffer = new
 StringBuilder(script.length() + 100);
   
 buffer.append(tinyMCE.triggerSave(true,false);).append(script)
   .append(
   
 tinyMCE.execCommand('mceRemoveControl', false, ' + area.getMarkupId()
   + '););
   return buffer;
   }
   };
 
 
 -Oorspronkelijk bericht-
 Van: martijn.lindh...@gmail.com [mailto:martijn.lindh...@gmail.com]
 Namens Martijn Lindhout
 Verzonden: donderdag 27 november 2008 16:57
 Aan: users@wicket.apache.org
 Onderwerp: TinyMCE in an Ajax loaded panel
 
 Hi all,
 
 I searched nabble, but couldn't find any recent posts that brought me a
 solution to this problem:
 
 I have a page with two panels, a master/detail setup. The master has a
 list
 of items, the detail a TinyMCE editor. The details panel is invisible
 until
 the user clicks an item in the master list. The list disappears and the
 detail panel is shown, all using Ajax. The problem is that the TinyMCE
 editor doesn't appear, it's just a normal textarea.
 
 Has anyone a solution to this problem?
 
 Thanks
 
 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com 
 Version: 8.0.175 / Virus Database: 270.9.10/1812 - Release Date:
 25-11-2008 19:53
 
 -
 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-in-an-Ajax-loaded-panel-tp20721519p25179752.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



TinyMCE in an Ajax loaded panel

2008-11-27 Thread Martijn Lindhout
Hi all,

I searched nabble, but couldn't find any recent posts that brought me a
solution to this problem:

I have a page with two panels, a master/detail setup. The master has a list
of items, the detail a TinyMCE editor. The details panel is invisible until
the user clicks an item in the master list. The list disappears and the
detail panel is shown, all using Ajax. The problem is that the TinyMCE
editor doesn't appear, it's just a normal textarea.

Has anyone a solution to this problem?

Thanks