you know jbq, i would love to see you for once answer a question instead of
only pimping dojo :)

class rtebehavior extends abstractbehavior implements iheadercontributor {
 public static JavascriptReference ref=new JavascriptReference(
rtebehavior.class, "rte.js");
 private Component target;

 public void bind(Component c) {
     target=c;
      // tell target textarea to output its markup id
      target.setOutputMarkupId(true);
  }

  public void renderhead(iheaderresponse r) {
       // include any needed js files
       r.renderJavascriptReference(ref);
       // output activating javascript
       r.renderOnDomReadyJavascript("displayEditor('"+target.getmarkupid()+"',
html, width, height)");
  }
}

and thats all there is to it, now what you do is

TextArea ta=new TextArea(...);
ta.add(new rtebehavior());

-igor


On 4/23/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:

* Ralf Eichinger:

> there is  a tinymce-component  in distribution.  but it  is very
> heavyloaded and I want to start a wysiwyg-textarea for wicket.

Such a widget already exists, check out DojoRichTextEditorBehavior
in WicketStuff Dojo:


http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/trunk/wicket-contrib-dojo/src/main/java/org/wicketstuff/dojo/markup/html/richtexteditor/DojoRichTextEditorBehavior.java?view=markup

Cheers,
--
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to