Just another Gem from the Wicket-Mailinglist:
[Update: see comments for updated Version]
francisco.treacy wrote:
i thought i'd like to share a simple behaviour for NicEdit
(http://nicedit.com/
).
to use it, just download nicedit and modify NICEDIT_JAVASCRIPT and NICEDIT_ICONS accordingly. (i chose to put them together in the same
package). if you download the basic version (without xhtml/ code view), when adding the behaviour pass 'false' into the constructor, in order not
to use the full panel. of course, you can use it with multiple textareas in the same page.
francisco
public class NicEditTextAreaBehavior extends AbstractBehavior {
private Component<TextArea<String>> textArea;
private Boolean fullPanel = Boolean.TRUE;
private static final ResourceReference NICEDIT_JAVASCRIPT =
new JavascriptResourceReference(NicEditTextAreaBehavior.class, "nicEdit.js");
private static final ResourceReference NICEDIT_ICONS = new
ResourceReference(NicEditTextAreaBehavior.class,
"nicEditorIcons.gif");
public NicEditTextAreaBehavior() {
}
public NicEditTextAreaBehavior(Boolean fullPanel) {
this.fullPanel = fullPanel;
}
@Override @SuppressWarnings("unchecked")
public void bind(Component component) {
this.textArea = component;
component.setOutputMarkupId(true);
}
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.renderJavascriptReference(NICEDIT_JAVASCRIPT);
response.renderOnDomReadyJavascript("new nicEditor({iconsPath : '"+
RequestCycle.get().urlFor(
NICEDIT_ICONS) +"', fullPanel : "+ fullPanel +"}).panelInstance('"
+ textArea.getMarkupId() + "');");
}
}
hi uwe,
nice post, but this is a gem that doesn't work
please follow the thread here: http://www.nabble.com/Re%3A-NicEditTextAreaBehavior-p17917729.html 
; and update the code.
thanks!
francisco