Customize RadEditor in custom modules - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Customize RadEditor in custom modules

  • Customize RadEditor in custom modules
  • 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
  • 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