Cute Editor for ASP

Code Snippet dropdown Customization

Code Snippet dropdown Customization

The Code Snippet dropdown of CuteEditor by default displays a predefined set of Code Snippets. 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 Codes element which contains the configuration information for the Code Snippet dropdown within Cute Editor. 

You can modify the Codes element to create your own Code Snippet list.


Example:

 

  1. <Codes>  
  2.     <item text="Email signature" value="Email signature"></item>  
  3.     <item text="Contact us" value="Contact us"></item>  
  4. </Codes>  

 

2. Programmatically populate the Code Snippet dropdown

Example:

 

  1. <%   
  2.        Dim editor   
  3.        Set editor = New CuteEditor   
  4.        editor.ID = "Editor1"  
  5.           
  6.        'Programmatically populate the Code Snippet dropdown.     
  7.        editor.CodeSnippetDropDownMenuNames = "Email signature, Contact us"  
  8.        editor.CodeSnippetDropDownMenuList = "Email signature, Contact us"  
  9.        editor.Text = "Hello World"  
  10.        editor.Draw()   
  11. %>