CuteEditor to RichTextEditor: How do I define a Snippet dropdownlist in the Control

  •  10-26-2012, 1:27 PM

    CuteEditor to RichTextEditor: How do I define a Snippet dropdownlist in the Control

    In CuteEditor, we utilize the function of creating a drop down list of snippets to insert into the text area by defining in the config file, <item type="dropdown" name="DropDownSnippets" text="snippets"/>.

    After that, we call something similar to the following to populate the drop downlist.

     

    1. CuteEditor.ToolControl toolctrl=Editor1.ToolControls["DropDownSnippets"];    
    2.    if(toolctrl!=null) {    
    3.       CuteEditor.RichDropDownList dropdown=(CuteEditor.RichDropDownList)toolctrl.Control;    
    4.       //the first item is the caption    
    5.       CuteEditor.RichListItem richitem=dropdown.Items[0];    
    6.       //clear the items from configuration files    
    7.       dropdown.Items.Clear();    
    8.       //add the caption   
    9.        dropdown.Items.Add(richitem);    
    10.       //add text and value    
    11.       dropdown.Items.Add("Email signature","<h3>this is my email      signature</h3>");   

     

    Selecting an item in the drop down list will result in the value being populated in the text box.

    We are now seeing if we can migrate to the Rich Text Editor, the first thing is to check if it allow us to perform the same function. However, I do not seem to find the option to define a drop down list as a control for the toolbox. Can anyone shed some light on this?  

View Complete Thread