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>
- <treedropdowns>
- <LinkTree>
- <item text="Msdn.microsoft.com" Selectable="False">
- <html><![CDATA[Msdn.microsoft.com <img src='/asp.net+wysiwyg+editor/developer+guide/scr/data/msdn16.gif' />]]></html>
- <item text=".NET Framework" value="http://msdn.microsoft.com/netframework/">
- <html><![CDATA[.NET Framework]]></html>
- </item>
- <item text="ASP.NET Home" value="http://msdn.microsoft.com/asp.net/">
- <html><![CDATA[ASP.NET Home]]></html>
- </item>
- </item>
- <item text="Yahoo.com" Selectable="False">
- <html><![CDATA[Yahoo.com <img src='/asp.net+wysiwyg+editor/developer+guide/scr/data/yahoo.gif' /> ]]></html>
- <item text="Yahoo Web" value="http://www.yahoo.com/">
- <html><![CDATA[Yahoo Web ]]></html>
- </item>
- </item>
- </LinkTree>
- </treedropdowns>
- <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="textbold" value="textbold">
- <html><![CDATA[<span class='textbold'>textbold</span>]]></html>
- </item>
- </CssClass>
- <CssStyle>
- <item text="[[NotSet]]" value="null"></item>
- <item text="font-size:18pt" value="font-size:18pt"></item>
- <item text="color:red" value="color:red"></item>
- </CssStyle>
- <Codes>
- <item text="Email signature">
- <value>Email signature</value>
- <html>Email signature</html>
- </item>
- <item text="Contact us">
- <value>Contact us</value>
- <html>Contact us</html>
- </item>
- </Codes>
- <Links>
- <item text="CuteSoft" value="">
- <html><![CDATA[<img src='/asp.net+wysiwyg+editor/developer+guide/scr/data/signature.gif' /> CuteSoft]]></html>
- </item>
- <item text="Mail to us" value="mailto:[email protected]">
- <html><![CDATA[<img src='/asp.net+wysiwyg+editor/developer+guide/scr/data/email.gif' /> Mail to us]]></html>
- </item>
- </item>
- <item text="MSDN" value="http://msdn.com/">
- <html><![CDATA[<img src='/asp.net+wysiwyg+editor/developer+guide/scr/data/msdn16.png' /> MSDN]]></html>
- </item>
- </Links>
- <Images>
- <item text="Logo">
- <value><![CDATA[<img border="0" src="/images/logo.gif" />]]></value>
- <html><![CDATA[<img src='/asp.net+wysiwyg+editor/developer+guide/scr/data/logo_s.gif' /> Company logo]]></html>
- </item>
- <item text="Flower">
- <value><![CDATA[<img border="0" src="/asp.net+wysiwyg+editor/developer+guide/scr/data/j0313820.jpg" />]]></value>
- <html><![CDATA[<img src='/asp.net+wysiwyg+editor/developer+guide/scr/data/flower_s.gif' /> Flower]]></html>
- </item>
- </Images>
- <DropForeColor>
- <item text="[[NotSet]]" value="null"></item>
- <item text="Black" color="Black" value="Black"></item>
- <item text="Red" color="Red" value="Red"></item>
- </DropForeColor>
- <DropBackColor>
- <item text="[[NotSet]]" value="null"></item>
- <item text="White" bgColor="White" value="White"></item>
- <item text="Red" bgColor="Red" value="Red"></item>
- </DropBackColor>
- <Zoom>
- <item text="400%" value="400"></item>
- <item text="200%" value="200"></item>
- <item text="100%" value="100"></item>
- <item text="75%" value="75"></item>
- <item text="25%" value="25"></item>
- </Zoom>
- <FormatBlock>
- <item text="[[DIV]]" value="<DIV>">
- <html><![CDATA[[[DIV]]]]></html>
- </item>
- <item text="[[Normal]]" value="<P>">
- <html><![CDATA[[[Normal]]]]></html>
- </item>
- <item text="[[Heading 1]]" value="<H1>">
- <html><![CDATA[<b style='font-size:24pt'>[[Heading 1]]</b>]]></html>
- </item>
- <item text="[[Heading 2]]" value="<H2>">
- <html><![CDATA[<b style='font-size:18pt'>[[Heading 2]]</b>]]></html>
- </item>
- </item>
- <item text="[[Address]]" value="<Address>">
- <html><![CDATA[[[Address]]]]></html>
- </item>
- <item text="[[MenuList]]" value="<MENU>">
- <html><![CDATA[[[MenuList]]]]></html>
- </item>
- </FormatBlock>
- <FontName>
- <item text="Arial" html="<font face='Arial'>Arial</font>">Arial</item>
- <item text="Verdana" html="<font face='Verdana'>Verdana</font>">Verdana</item>
- </FontName>
- <FontSize>
- <item text="[[NotSet]]" value="null">
- <html><![CDATA[[[NotSet]]]]></html>
- </item>
- <item text="1 (8pt)" value="1">
- <html><![CDATA[<font size='1'>Size 1 </font>(8pt)]]></html>
- </item>
- <item text="2 (10pt)" value="2">
- <html><![CDATA[<font size='2'>Size 2 </font>(10pt)]]></html>
- </item>
- </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 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://richscripts.com/">
<html><![CDATA[
<img src='http://richscripts.com/images/signature.gif' /> CuteSoft
]]>
</html>
</item>