When you click [Ctrl+Enter] in Rich Text Editor it inserts a paragraph (<p>
) at the cursor, and also encapsulates the content before the cursor in another paragraph.
I've already created a custom Rich Text Editor profile in core://sitecore/system/Settings/Html Editor Profiles/Rich Text Custom
which includes a custom Configuration Type which inherits from the default settings, but have set linebreaks to use <br>
:
public class CustomEditor : Sitecore.Shell.Controls.RichTextEditor.EditorConfiguration
{
protected override void SetupEditor()
{
base.SetupEditor();
Editor.NewLineMode = EditorNewLineModes.Br;
}
}
Even with this setting, pressing [Ctrl+Enter] in the editor inserts a new paragraph.
I though maybe the Editor.EnableFilter(EditorFilters.FixEnclosingP);
filter might have something to do with it, but enabling/disabling this has no effect.
So, how can I prevent Rich Text Editor from inserting paragraphs when pressing [Ctrl+Enter] on the keyboard?
Sitecore 8.2 Update 5, Issue is tested in IE11 + Chrome68