Sitefinity CMS

Change RadEditor Send comments on this topic.
How-to > Controls > RadControls for ASP.NET AJAX > Change RadEditor

Glossary Item Box

RadEditor for ASP.Net AJAX is the successor of the well-known industry-standard Editor for ASP.NET. The tight integration with ASP.NET AJAX and powerful new capabilities of the AJAX suite features the new WYSIWYG Editor as a flexible and lightweight component, turning to be the fastest loading Web Editor. For more information on the AJAX editor control and its new features, see RadEditor Overview.

 

Allowing Scripts

In order to allow scripts in RadEditor for ASP.Net AJAX , open the corresponding template in Sitefinity, and set the property in the control declaration: 

Copy Code
<telerik:RadEditor  
   
runat="server"  
   
ID="RadEditor1"
   
AllowScripts="true"  

The templates are located in ~/Sitefinity/Admin/ControlTemplates/ folder. For example, ~/Sitefinity/Admin/ControlTemplates/Generic_Content/EditorTemplate.ascx is the template for the Generic Content public control.

Changing Document Size

The current functionality of RadEditor for ASP.Net AJAX includes values that sometimes need to be changed in order to accommodate custom needs. One such value is the limit of document size when uploading documents to the editor. The following file is used by RadEditor in all modules:

  /<your_project>/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml

 

There is no configuration file in RadControls for ASP.Net AJAX . Instead, the Tools file is used.

  

The file that should be modified in order to increase document file size is EditorToolsFile.xmlThe MaxUploadFileSize property specifies the maximum-allowed file size of a FileBrowser dialog. This property is currently set to 512000. Change that value. It is set as a property of the corresponding Manager. It works for modules and pages at the same time.

 

Following is a list of the available managers for RadEditor:

RadEditor Managers Copy Code
<telerik:radeditor runat="server" ID="RadEditor1"  >   
  
<ImageManager ViewPaths="~/Images" UploadPaths="~/Images/New" DeletePaths="~/Images/New/Articles,~/Images/New/News" />
  
<MediaManager ViewPaths="~/Files" UploadPaths="~/Files/New" DeletePaths="~/Files/New/Articles,~/Files/New/News" />
  
<FlashManager ViewPaths="~/Files" UploadPaths="~/Files/New" DeletePaths="~/Files/New/Articles,~/Files/New/News" />
  
<TemplateManager ViewPaths="~/Files" UploadPaths="~/Files/New" DeletePaths="~/Files/New/Articles,~/Files/New/News" />
  
<DocumentManager ViewPaths="~/Files" UploadPaths="~/Files/New" DeletePaths="~/Files/New/Articles,~/Files/New/News" />
</
telerik:radeditor>

 

In order to check if the path to the Tools file is correctly specified in a specific module, check the following directory holding all templates:

  /<your_project>/Sitefinity/Admin/ControlTemplates/<given_module>/

 

Make sure that the path in the RadEditor section is the same as the location of the EditorToolsFile.xml 

 

Here is an example of such a section in the Generic Content module:

ControlPanelEdit.ascx Copy Code
<radTS:PageView runat="server" ID="EditPage">
 
<div class="mainForm">
  
...
   
<telerik:RadEditor
       
runat="server"
       
ID="RadEditor1"
       
ToolsFile="~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml"
</radE:RadEditor>