I have an editor that I can't seem to get my custom tools loaded into correctly. The group and tools load (the custom events are working also), but the text on the tools doesn't. All I see is the groups, with buttons that have a gear icon on them (but the tooltips correctly show the text). Since the editor shouldn't have the custom tools in every user scenario, I left this part to be loaded in by the code behind and the rest of the tools are loaded by an XML file. Not sure if it matters, but I am doing this with the Ribbon appearance. And the aspx page is being rendered inside of an iFrame.
cs code (called from Page_Load)
private void LoadFileTab()
{
//----------------------------------------------------
// Export Group (File Tab)
//----------------------------------------------------
EditorToolGroup exportGroup = new EditorToolGroup();
exportGroup.Tab = "File";
exportGroup.Tag = "Export";
theEditor.Tools.Insert(0, exportGroup);
EditorTool exportDOCX = new EditorTool();
exportDOCX.Name = "ExportDOCX";
exportDOCX.Text = "Export as DOCX";
exportDOCX.ShowText = true;
exportDOCX.Visible = true;
exportDOCX.RenderMode = RenderMode.Auto;
exportGroup.Tools.Add(exportDOCX);
EditorTool exportPDF = new EditorTool();
exportPDF.Name = "ExportPDF";
exportPDF.Text = "Export as PDF";
exportPDF.ShowText = true;
exportPDF.Visible = true;
exportPDF.RenderMode = RenderMode.Classic;
exportGroup.Tools.Add(exportPDF);
//----------------------------------------------------
// Save/Submit Group (File Tab)
//----------------------------------------------------
EditorToolGroup saveGroup = new EditorToolGroup();
saveGroup.Tab = "File";
saveGroup.Tag = "Save/Submit";
theEditor.Tools.Insert(0, saveGroup);
EditorTool save = new EditorTool();
save.Name = "Save";
save.Text = "Save Draft";
save.ShowText = true;
save.Visible = true;
save.RenderMode = RenderMode.Lightweight;
saveGroup.Tools.Add(save);
EditorTool submit = new EditorTool();
submit.Name = "Submit";
submit.Text = "Submit Draft";
submit.ShowText = true;
submit.Visible = true;
submit.RenderMode = RenderMode.Native;
saveGroup.Tools.Add(submit);
}
aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StandardEditor.aspx.cs" Inherits="FIS.Presentation.EWAPPM.DocumentScreens.DocEditor" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<
html
xmlns
=
'http://www.w3.org/1999/xhtml'
>
<
script
type
=
"text/javascript"
>
function OnClientLoad(editor, args)
{
editor.fire("ToggleScreenMode");
}
</
script
>
<
head
runat
=
"server"
>
<
link
href
=
"../Content/Telerik/styles.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"./Telerik/styles.css"
rel
=
"stylesheet"
/>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
runat
=
"server"
ShowChooser
=
"false"
/>
<
div
class
=
"demo-containers"
>
<
div
class
=
"demo-container"
>
<
telerik:RadEditor
RenderMode
=
"Lightweight"
Skin
=
"MetroTouch"
ID
=
"theEditor"
EnableTrackChanges
=
"true"
EnableComments
=
"true"
runat
=
"server"
Width
=
"100%"
ToolsFile
=
"./EditorTools/StandardEditorTools.xml"
EnableResize
=
"False"
ContentAreaMode
=
"Div"
DialogHandlerUrl
=
"~/Telerik.Web.UI.DialogHandler.axd"
ToolbarMode
=
"RibbonBar"
OnClientLoad
=
"OnClientLoad"
ContentFilters
=
"DefaultFilters,PdfExportFilter"
>
<
TrackChangesSettings
CanAcceptTrackChanges
=
"true"
UserCssId
=
"reU0"
></
TrackChangesSettings
>
<
ExportSettings
OpenInNewWindow
=
"true"
>
<
Docx
/>
<
Pdf
/>
</
ExportSettings
>
<
ImageManager
EnableAsyncUpload
=
"true"
>
</
ImageManager
>
<
Content
>
</
Content
>
<
Modules
>
<
telerik:EditorModule
Name
=
"RadEditorHtmlInspector"
Enabled
=
"false"
/>
<
telerik:EditorModule
Name
=
"RadEditorNodeInspector"
Enabled
=
"false"
/>
<
telerik:EditorModule
Name
=
"RadEditorDomInspector"
Enabled
=
"false"
/>
<
telerik:EditorModule
Name
=
"RadEditorStatistics"
Enabled
=
"false"
/>
</
Modules
>
</
telerik:RadEditor
>
<
script
type
=
"text/javascript"
>
Telerik.Web.UI.Editor.CommandList["ExportPDF"] = function (commandName, editor, args)
{
__doPostBack("", commandName);
}
Telerik.Web.UI.Editor.CommandList["ExportDOCX"] = function (commandName, editor, args)
{
__doPostBack("", commandName);
}
Telerik.Web.UI.Editor.CommandList["Save"] = function (commandName, editor, oTool)
{
fireAjaxRequest("Save");
}
Telerik.Web.UI.Editor.CommandList["Submit"] = function (commandName, editor, oTool)
{
fireAjaxRequest("Submit");
}
</
script
>
</
div
>
</
div
>
<
telerik:RadAjaxManager
runat
=
"server"
ID
=
"RadAjaxManager1"
OnAjaxRequest
=
"RadAjaxManager1_AjaxRequest"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"ConfiguratorPanel1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"theEditor"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"ConfiguratorPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function fireAjaxRequest(operation)
{
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.ajaxRequest(operation);
}
</
script
>
</
telerik:RadScriptBlock
>
<
telerik:RadAjaxLoadingPanel
runat
=
"server"
ID
=
"RadAjaxLoadingPanel1"
Visible
=
"False"
>
</
telerik:RadAjaxLoadingPanel
>
</
form
>
</
body
>
</
html
>