RadEditor for ASP.NET

Using the ToolsFile.xml Send comments on this topic.
See Also
Toolbars > Using the ToolsFile.xml

Glossary Item Box

Telerik RadEditor is shipped with a default ToolsFile.xml, which is pre-set to include all available tools. It is located in the "~/RadControls/Editor" folder. 

The path to ToolsFile.xml can be set using the ToolsFile property. It is set by default to point to the sample ToolsFile "~/RadControls/Editor/ToolsFile.xml".


The ToolsFile must have a valid XML structure as shown below:

  • All attributes and their values are case sensitive and all tags should be closed properly.
  • If you want to add special symbols in the ToolsFile it should be in Unicode format. If encoding is not set, RadEditor will raise a System.Xml.XmlException.

You can also create your own ToolsFile.xml using the provided information below:
ToolFile.xml Copy Code
<root>
    
<modules>
            
<module />
            
<module />
    
</modules>
    
<tools>
            
<tool />
            
<tool />
            
...
   
</tools>
   
<tools>
            
<tool />
            
...
   
</tools>
    
...
   
<links>
           
<link />
           
<link />
   
</links>
   
<colors>
           
<color />
           
<color />
   
</colors>
</
root>

Tools And Modules Attributes:

<tool> element valid attributes:

name / commandName(required):

AboutDialog

FindAndReplace

Indent

InsertTime

Outdent

StrikeThrough

Zoom

AbsolutePosition

FlashManager

InsertHorizontalRule

InsertUnorderedList

Paste

Subscript

 

ApplyClass

FontName

InsertCustomLink

Italic

PasteAsHtml

Superscript

 

BackColor

FontSize

InsertDate

JustifyCenter

PasteFromWord

TemplateManager

 

Bold

ForeColor

InsertFormElement

JustifyFull

PasteFromWordNoFontsNoSizes

ToggleDocking

 

Copy

FormatBlock

InsertOrderedList

JustifyLeft

PastePlainText

ToggleScreenMode

 

Custom

FormatStripper

InsertParagraph

JustifyRight

Print

ToggleTableBorder

 

Cut

Help

InsertSnippet

LinkManager

Redo

Underline

 

DecreaseSize

ImageManager

InsertSymbol

MediaManager

RepeatLastCommand

Undo

 

DocumentManager

IncreaseSize

InsertTable

ModuleManager

SpellCheck

Unlink

ShortCut
(not required):

The key combination for the specific tool. Examples:

 

Copy Code
<tool name="LinkManager" shortcut="Ctrl+L" />
<tool name="TemplateManager" shortcut="Ctrl+Shift+Alt+T" />


ShowText
(not required)
Specifies whether to display the button name next to its icon

<tool name="ImageManager" shortcut="Ctrl+G" showtext="true" />
ShowIcon
(not required)
Specifies whether to display the tools icon or not. Default value is true.

Copy Code
<tool name="ImageManager" shortcut="Ctrl+G" showicon="false" showtext="true" />
IconUrl
(used especially for the custom tools)
Points to an image file that the tool will display as its icon

Copy Code
<tool name="ImageManager" iconurl="~/RadControls/Editor/Skins/Default/Buttons/Custom.gif" />

 

<separator> element

true/false Indicates whether a separator should appear at current position.

 

<tools> element valid attributes:

name (required): This string will identify the toolbar.
enabled (not required):

true/false (Indicates whether the tool will be available on the client or not)

visible (not required):

true/false (Indicates whether the tool should appear in the toolbar or not. This toolbar will be available client-side - the property defines only the visibility of the tool.)

dockable (not required):

true/false (Indicates whether you will be able to drag&drop the toolbar to the docking zones)
showtoolstext (not required) true/false (Indicates whether the text alternative /localizable label/ will be displayed next to the button. This text can be interpreted by screen readers for the purposes of Accessibility)
toolstextposition  (not required) bottom/right (Indicates the position of the text alternative of the tool /see above/)
IsRibbon
(not required)
true/false (Indicates whether Telerik RadEditor will renders its toolbars in a Microsoft Office 2007 RibbonBar. The property is applicable only for Toolbars)

 

<module> element valid attributes:
(module elements should appear as child elements of an element "modules")

name (required):

The friendly name of the module. When in floating mode the name will appear in the tool's titlebar.

dockable (not required):

(Indicates whether you will be able to drag&drop the tool to the docking zones)

enabled (not required):

(Indicates whether the module will be available on the client or not)

visible (not required):

(Indicates whether the module should appear in the toolbar or not. This module will be available client-side - the property defines only the visibility of the module. )

 

<link> element valid attributes:
(link elements should appear as child elements of an element "links")

name (required):

Link/Category Name/Alias

href (not required):

URL of the link/category

target (not required):

The target window of the link

tooltip (not required):

The tooltip for the link


<symbol> element valid attributes:
(symbol elements should appear as child elements of an element "symbols")

value (required):

The symbol to be displayed


<font> element valid attributes:
(font elements should appear as child elements of a tool element with "name" attribute set to "fontNames")

name (required):

Font Name

 

<class> element valid attributes:
(class elements should appear as child elements of an element "classes")

name (required):

Class Alias

value (required):

Class Name

 

<paragraph> element valid attributes:
(paragraph elements should appear as child elements of an element "paragraphs")

name (required):

Paragraph Alias

value (required):

Paragraph Name

 

<color> element valid attributes:
(color elements should appear as child elements of an element "colors")

value (not required):

Hex value of the color

<snippet> element valid attributes:
(snippet elements should appear as child elements of an element "snippets")

name (required):

Snippet Alias

 

<language> element valid attributes:
(language elements should appear as child elements of an element "Languages")

code (required):

Language code

title (required):

Language Title

 

The contextMenus tag in the Tools file allows you to change the default or specify custom context menus for different HTML elements.

 

<contextMenu> element valid attributes:
(contextMenu elements should appear as child elements of an element "contextMenus")

forElement (required):

The HTML element that will call this menu.

enabled (required):

Defines if this context menu is switched.



The example below shows how to attach custom context menus for <A> and <P> elements.

ToolFile.xml Copy Code
<contextMenus>
  
<contextMenu forElement="A" enabled="false">
  
</contextMenu>
  
<contextMenu forElement="P">
      
<tool name="JustifyLeft" />
      
<tool name="JustifyCenter" />
      
<tool name="JustifyRight" />
      
<tool name="JustifyFull" />
  
</contextMenu>
</
contextMenus>

 

 

See Also