CuteEditor for .NET

Dropdown Configuration File Structure

Dropdown Configuration File Structure   

The CuteEditor dropdown configuration file, which contains XML, specifies the dropdown configuration information of the CuteEditor instance.

 

This topic explains the contents of the Cute Editor dropdown configuration file. Specifically, it shows the XML structure. The name of the dropdown configuration file is Common.config which can be found in the /CuteEditor/Configuration/Shared folder.
 
XML Structure:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

       <!-- pre define the dropdown items -->

       <dropdowns>

          <CssClass>

               <item text="[[NotSet]]" value="null"></item>

                   <item text="Red Text" value="RedColor">

                       <html><![CDATA[
                                            <span style='color:red'>RedColor</span>
                                    ]]>
                      </html>

                  </item>

                  <item text="Highlight" value="Highlight">

                      <html><![CDATA[
                                            <span style='background-color: yellow'>Highlight</span>
                                    ]]>
                      </html>

                  </item>

                  <item text="Bold Green Text" value="BoldGreen">

                      <html><![CDATA[
                                            <span style='color: green; font-weight: bold;'>Bold Green Text</span>
                                ]]>
                      </html>

                  </item>

          </CssClass>

          <CssStyle>

          </CssStyle>

          <Codes>

          </Codes>

          <Links>

          </Links>

          <Images>

          </Images>

          <Zoom>

          </Zoom>

          <FormatBlock>

          </FormatBlock>

          <FontName>

          </FontName>

          <FontSize>

          </FontSize>

       </dropdowns>

</configuration>

 

  <configuration> Element

Each configuration file must start with the configuration element.

  <dropdowns> Element

This element contains the configuration information for the dropdowns within CuteEditor.

  <CssClass> Element

This element contains the configuration information for the CssClass dropdown within CuteEditor.

  <Codes> Element

This element contains the configuration information for the Code Snippet dropdown within CuteEditor.

  <Links> Element

This element contains the configuration information for the Links dropdown within CuteEditor.

  <Images> Element

This element contains the configuration information for the Images dropdown within CuteEditor.

  <Zoom> Element

This element contains the configuration information for the Zoom dropdown within CuteEditor.

  <FormatBlock> Element

This element contains the configuration information for the Paragraph dropdown within CuteEditor.

  <FontName> Element

This element contains the configuration information for the Font Name dropdown within CuteEditor.

  <FontSize> Element

This element contains the configuration information for the Font Size dropdown within CuteEditor.



    <CssClass>, <Codes><Links>, <Images>, <Zoom>, <FormatBlock>, <FontName>,  <FontSize>: <item> Element

This element contains the configuration information for a data item for use within a CuteEditor dropdown menu.
 

Attribute Description
text Sets the text displayed in a CuteEditor dropdown menu data item when not rendering as rich style
html Sets the html displayed in a CuteEditor dropdown menu data item when rendering as rich style.

In order for the HTML code to be interpreted correctly in the XML file, you need to enclose it in <![CDATA[ ]]>. CDATA is a special comment tag within an XML document. It basically says, "everything inside this tag is not XML and should be ignored by the parser".
value

Sets the value which is returned to the server when the form control is submitted. 

Example:

For the Font Size dropdown menu, the value should be a number.

For the CssClass dropdown menu, the value should be a class name.


Example:  

1.   <item text="color:red" value="color:red"></item>

2.   <item text="CuteSoft" value="http://cutesoft.net/">

          <html><![CDATA[

                     <img border=0 align='absMiddle' src='http://cutesoft.net/data/signature.gif' /> CuteSoft

                    ]]>

         </html>

     </item>