+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / Customize RadEditor in custom modules

Customize RadEditor in custom modules

2 posts, 0 answered
  1. jocelyn payneau
    jocelyn payneau avatar
    51 posts
    Registered:
    07 Dec 2009
    15 Mar 2011
    Link to this post
    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
  2. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    22 Mar 2011
    Link to this post
    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
2 posts, 0 answered