Style-Classes

User-defined classes can be activated in the rich text editor via choice boxes. The definition of the classes and the css styles applicable in the rich text editor can be determined via the elements xe:inlineStyle for inline elements and xe:blockStyle for block elements.



<xe:editor xmlns:xe= "http://onionworks.net/2004/webeditor/xhtmleditor/configuration"> 
  <xe:settingsGroup 
    name="EditingServices.XHtml" 
    editorHeight="600px" 
  > 
    <xe:inlinePictures maxWidth="320" maxHeight="320" /> 
    <xe:styles> 
      <xe:inlineStyle name="myTest" css="background-color: green; color: white" /> 
      <xe:blockStyle name="myBlockTest" css="background-color: red; color: white" /> 
      <xe:blockStyle name="myBlockTest2" css="background-color: blue; color: white" /> 
    </xe:styles> 
  </xe:settingsGroup> 
</xe:editor> 

The user-defined classes can be localised for the choice box.



<resources>
  <namespace name="Onion.Client.WebUI">
    <namespace name="XHtmlEditors">
      <type name="EditingServices.XHtml">
        <item name="Class:myTest#Label">Testklasse</item>
         <item name="Class:myBlockTest#Label">Blockklasse</item>
         <item name="Class:myBlockTest2#Label">Blockklasse 2</item>       
      </type>
    </namespace>
  </namespace>
</resources>