Customize RadEditor in custom modules

Posted by Community Admin on 05-Aug-2018 22:25

Customize RadEditor in custom modules

All Replies

Posted by Community Admin on 15-Mar-2011 00:00

Hello, 

I'd like to modify the HtmlField used in custom modules. I need to customize the toolbars using the xml file. 
I did it for the content block editor but changes are not updated in custom modules. 

I think I should create a new project as Slavo did for image selector. 

Could you provide me a bare bone project to do this?

Jocelyn

Posted by Community Admin on 22-Mar-2011 00:00

Hi jocelyn payneau,

To provide different configuration for the RadEditor, you need to inherit from HtmlField and set its properties manually. Then you need to instruct your module to use your inherited field. Here are the steps you need to follow:

  • Configure the location of the editor tools xml file in Administration -> Settings -> Advanced -> Appearance -> EditorConfigurations. The key is a custom string, the Value is the path to the XML.
  • Create your custom field by inheriting from HtmlField
  • Set the EditorToolsConfiguration="Custom" and EditorToolsConfigurationKey="your_key_from_previous_step" in the inherited field.
  • Create definitions for your module to use the inherited custom field (whenever you use HtmlFieldElement, set the FieldType = typeof(your_inherited_field_type);
This should make the HtmlField in your module use your custom tools file.

Regards,
Slavo
the Telerik team

This thread is closed