Click
Click Examples

Email Form



 

 

The form demonstrates a custom RichTextArea control using the YUI editor. The control overrides the Field method getHeadElements() to include its JavaScript imports automatically:
public List getHeadElements() {
    if (headElements == null) {
        headElements = super.getHeadElements();
        headElements.add(new CssImport("/yui/fonts/fonts-min.css"));
        headElements.add(new CssImport("/yui/editor/skins/sam/simpleeditor.css"));
        headElements.add(new JsImport("/yui/yahoo-dom-event/yahoo-dom-event.js"));
        headElements.add(new JsImport("/yui/element/element-beta-min.js"));
        headElements.add(new JsImport("/yui/container/container_core-min.js"));
        headElements.add(new JsImport("/yui/editor/simpleeditor-min.js"));
    }

    ...

    return headElements;
}