Telerik RadEditor can use ConfigFiles. These are XML files, which contain the whole configuration of the component. They can be shared among multiple editors and thus make group re-configuration extremely easy. In case you want to manage a number of identical editors at once you can just set them to use one ConfigFile and modify only that file when needed.
Moreover, you can still tweak individual editors by setting certain properties directly in the Telerik RadEditor tag, as those will override the properties defined in the ConfigFile.
 |
IMPORTANT: The ConfigFile property does not have a default value set. This means that you must point the ConfigFile property to the configuration file that you intend to use. For example if you want to use the default configuration file that comes with the Telerik RadEditor's distribution, you must set ConfigFile="~/RadControls/Editor/ConfigFile.xml" |
Below is an example of a simple ConfigFile:
| ConfigFile.xml |
Copy Code |
|
<configuration> <property name="ToolbarMode">Default</property> <property name="UseClassicDialogs"> false</property> <property name="NewLineBr"> true</property> <property name="ToolsFile">~/RadControls/Editor/ToolsFile.xml</property> <property name="Skin">Default</property> <property name="SaveAsXhtml">false</property> <property name="AllowThumbGeneration"> true</property> <property name="ImagesPaths"> <item> ~/Img/</item> </property> <property name="UploadImagesPaths"> <item> ~/Img/</item> </property> <property name="DeleteImagesPaths"> <item> ~/Img/</item> </property> <property name="Language">en-US</property> </configuration> |
As a result, the <RadEditor> tag can be reduced to the following:
| ASPX |
Copy Code |
|
<rad:RadEditor id="editor1" runat="server" ConfigFile= "~/RadControls/Editor/ConfigFile.xml"> </rad:RadEditor> |
The "~" tilde symbol represents your web application root directory
ConfigFile structure:
The ConfigFile must have a valid structure as shown below.
 |
Note, that all items are case sensitive! |
| ConfigFile.xml |
Copy Code |
|
<configuration> <property> <item> ... </item> <item> ... </item> ... </property> ... </configuration> |
| "property" element valid attributes: |
| name (required): |
|
| |
"item" element valid attributes: (item elements should appear as child elements of a property element with "name" attribute set to: "ButtonsStyle", "ImagesPaths", "UploadImagesPaths", "DeleteImagesPaths", "FlashPaths", "UploadFlashPaths", "DeleteFlashPaths", "MediaPaths", "UploadMediaPaths", "DeleteMediaPaths", "DocumentsPaths", "UploadDocumentsPaths", "DeleteDocumentsPaths", "DocumentsFilters", "MediaFilters", "TemplatePaths", "UploadTemplatePaths", "DeleteTemplatePaths", "TemplateFilters", "MaxTemplateSize") |
 |
IMPORTANT: If you are upgrading from a previous version of Telerik RadEditor, make sure that you remove all deprecated properties from the XML ConfigFile, otherwise the application will throw an exception. |