Hello,
I am adding a context menu to body tag of rad editor control while "EditorContentAreaMode" is set to Div.
Problem is that, it is not showing the context menu on right click in radeditor content area..
Below is some code sample:
Setting Editor properties
Adding context menu
I am adding a context menu to body tag of rad editor control while "EditorContentAreaMode" is set to Div.
Problem is that, it is not showing the context menu on right click in radeditor content area..
Below is some code sample:
Setting Editor properties
Editor.EditModes = EditModes.Design | EditModes.Html;
Editor.Width =
new
System.Web.UI.WebControls.Unit(
"100%"
, CultureInfo.InvariantCulture);
Editor.Height = 0;
Editor.AutoResizeHeight =
true
;
Editor.ToolbarMode = Telerik.Web.UI.EditorToolbarMode.PageTop;
Editor.ContentAreaMode = EditorContentAreaMode.Div;
Editor.BackColor = System.Drawing.Color.Transparent;
//Editor.StripFormattingOnPaste = Telerik.Web.UI.EditorStripFormattingOptions.MSWordRemoveAll;
Editor.StripFormattingOptions = EditorStripFormattingOptions.MSWordRemoveAll;
Editor.ToolsFile =
"/Modules/HtmlArticle/ToolsFile.xml"
;
InternalLinks EditorLinks =
new
InternalLinks();
Editor = EditorLinks.LoadLinks(Editor);
Editor = CSSClass.LoadCSSToParagraphList(Editor);
Editor.CssClasses.Clear();
Editor.CssFiles.Clear();
Editor.CssFiles.Add(
"/mb/pub/css/default.css"
);
Editor.CssClass =
"mb_modules_HtmlArticle_articleEditors"
;
Adding context menu
EditorTool SaveDraftTool =
new
EditorTool();
SaveDraftTool.Text =
"Save Draft"
;
SaveDraftTool.Name =
"SaveDraft"
;
EditorContextMenu forBody =
new
EditorContextMenu();
forBody.TagName =
"BODY"
;
forBody.Tools.Add(SaveDraftTool);
Editor.ContextMenus.Add(forBody);