Cute Editor for ASP

Paragraph dropdown Customization

Paragraph dropdown Customization


The Paragraph dropdown of CuteEditor by default displays a predefined set of format blocks. You can easily modify this default set 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 FormatBlock element which contains the configuration information for the Paragraph dropdown within Cute Editor.  By default, it contains the following format blocks:

 

 

You can modify the FormatBlock element to create your own format block list.


Example:

 

  1. <FormatBlock>  
  2.      <item text="[[Normal]]" value="&lt;P&gt;"></item>  
  3.       <item text="[[Heading 1]]" value="&lt;h1&gt;"></item>  
  4.       <item text="[[Heading 5]]" value="&lt;h5&gt;"></item>  
  5. </FormatBlock>  

 

Now the Paragraph dropdown contains only Heading 1, Heading 5 and Normal.




 


2. Programmatically populate the Paragraph dropdown

Example:

 

  1. <%   
  2.        Dim editor   
  3.        Set editor = New CuteEditor   
  4.        editor.ID = "Editor1"  
  5.           
  6.        'Programmatically populate the Paragraph dropdown.     
  7.        editor.ParagraphsListMenuNames="H2, H4, h5"  
  8.        editor.ParagraphsListMenuList="&lt;H2gt;, &lt;H4&gt;, &lt;h5&gt;"  
  9.        editor.Text = "Hello World"  
  10.        editor.Draw()   
  11. %>