0

Looking at this: awareweb.com/blog/customizing-sitecores-rich-text-editor-dialogs and this Unable to customize HyperLink Manager in Rich Text Editor in Sitecore, if we want to override EditorPage.aspx, rather than replace it in its existing location, how can we get it to pick up what's in the 'override' folder, so that we don't lose a new feature with a Sitecore upgrade?

  • 2
    From what I remember, "override" folder only works with XML Controls, not with "aspx" pages. So I don't think what you want is possible. – Marek Musielak Jan 8 at 9:35
1

The path to EditorPage.aspx is hard-coded in Sitecore.Shell.Applications.ContentEditor.RichText. That is the class resposible for the Rich Text field type. You would need to provide an alternate field type implementation if you wanted to point the field at a different aspx page. I wouldn't recommend it.

For most editor customizations, a better approach is to create a custom EditorConfiguration. If you are just trying to set ExternalDialogsPath, something like this should do it:

public class CustomEditorConfig : Sitecore.Shell.Controls.RichTextEditor.EditorConfiguration
{
    public CustomEditorConfig(Item profile) : base(profile)
    {
    }

    protected override void SetupEditor()
    {
        Editor.ExternalDialogsPath = "~/sitecore/shell/controls/rich text editor/Dialogs/";
        base.SetupEditor();
    }
}

You would then either need to specify this type in the Configuration Type item under your Rich Text Editor profile in the core database or patch it in as the value of the HtmlEditor.DefaultConfigurationType setting.

Here's a couple of blog posts that show examples of this sort of customization to the editor:

| improve this answer | |
  • I got this working. I'm overriding LinkManager.ascx, having set the ExternalDialogsPath to my '~/sitecore/shell/override/controls/rich text editor/Dialogs/' folder, and set the Configuration Type under 'sitecore/system/Settings/Html Editor Profiles/Rich Text Default/Configuration Type' to use my CustomEditorConfig. However, in extending the Hyperlink Manager, previously selected dropdown values are not being re-set to what was previously selected when I re-open it. Would Localization resource files also need to be included within the override folder in this scenario, or is it something else? – Harald Greve Feb 14 at 11:30
  • Just to clarify the above, the localization is working. It's just not managing to set the selected value from the dropdown values. – Harald Greve Feb 14 at 14:24
  • 1
    You would need to add logic to your control to set the appropriate initial state in the load event based on the currently selected HTML in the field. I would need more info about the customization to help further. A separate question might be appropriate. – Ben Golden Feb 14 at 15:34
  • I've added a separate question with a more detailed description here: sitecore.stackexchange.com/questions/24191/… – Harald Greve Feb 14 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.