[opencms-dev] HtmlWidget with enhanced editor?

Michael Emmerich m.emmerich at alkacon.com
Wed Nov 24 15:08:03 CET 2010


Hi Sadra,

> When creating an element with *HtmlWidget *datatype, a simple WYSIWYG
> text area will be created. You can easily create formatted text but you
> can not insert *hyper links* or *pictures *within your text. Is there
> any possibility to have a better Html editor while editing your
> XML-content page?

to activate the buttons, you have to edit the XSD file of your 
structured content and specify a layout configuration in the appinfo 
node for your OpenCmsHtml element(s).

For each button, a reserved String has to be given in the configuration
attribute. See the example for a field named "text" below with all 
possible buttons enabled:

<xsd:annotation>
     <xsd:appinfo>
         <layouts>
             <layout element="Text" widget="HtmlWidget"
                     configuration="height:400px,link,anchor,formatselect,
 
source,imagegallery,downloadgallery,linkgallery,htmlgallery,
 
tablegallery,image,table,css:/path/to/css/style.css,stylesxml:
                     /path/to/styles/file.xml"/>
         </layouts>
     </xsd:appinfo>
</xsd:annotation>

-- 
Kind Regards,
Michael.

-------------------
Michael Emmerich

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org




More information about the opencms-dev mailing list