Cute Editor for ASP

CSS Class dropdown Customization

CSS Class dropdown Customization


The CSS Class dropdown of CuteEditor displays a predefined set of CSS Classes. You can easily add your own CSS Classes using the following methods.
 

1. Edit Dropdown Configuration file (Common.config).

The dropdown configuration file (Common.config) can be found in the CuteEditor_Files/Configuration/Shared folder. In dropdown configuration file you can find the CssClass element which contains the configuration information for the CSS Class dropdown within Cute Editor.  

You can modify the CssClass element to create your own CSS Classes list.


Example:

  1. <CssClass>  
  2.    <item text="[[NotSet]]" value="null"></item>  
  3.    <item text="Red Text" value="RedColor">  
  4.     <html><![CDATA[<span style='color:red'>RedColor</span>]]></html>  
  5.    </item>  
  6.    <item text="textbold" value="textbold">  
  7.     <html><![CDATA[<span class='textbold'>textbold</span>]]></html>  
  8.    </item>  
  9.    <item text="Highlight" value="Highlight">  
  10.     <html><![CDATA[<span style='background-color: yellow'>Highlight</span>]]></html>  
  11.    </item>  
  12.    <item text="Bold Green Text" value="BoldGreen">  
  13.     <html><![CDATA[<span style='color: green; font-weight: bold;'>Bold Green Text</span>]]></html>  
  14.    </item>  
  15. </CssClass>  


Now the CSS Class dropdown contains "RedColor", "textbold", "Highlight" and "BoldGreen".


CSS Class dropdown 

2. Programmatically populate the CSS Class dropdown

Example:

  1. <%   
  2.        Dim editor   
  3.        Set editor = New CuteEditor   
  4.        editor.ID = "Editor1"  
  5.           
  6.        'Programmatically populate the CSS Class dropdown.     
  7.        editor.CssClassStyleDropDownMenuNames = "RedColor,Highlight,Bold Green Text"  
  8.        editor.CssClassStyleDropDownMenuList = "RedColor,Highlight,BoldGreen"  
  9.        editor.Text = "Hello World"  
  10.        editor.Draw()   
  11. %>