I'm using couple of Rad Editor controls in my webpart and using ToolProviderID for performance optimization. I'm initializing one rad editor toolbar from server side and using the same toolbar to provide other rad editors with their toolbar, Bascially I'm using ToolProviderID attribute to initialize other RadEditors, after doing this the Comments and Track Changes feature stop working although their options are selected in the toolbar. <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor1" EnableTrackChanges="true" EnableComments="true"> <TrackChangesSettings Author="AuthorName" CanAcceptTrackChanges="true" UserCssId="reU0" /> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="AcceptTrackChange" /> <telerik:EditorTool Name="RejectTrackChange" /> <telerik:EditorTool Name="AcceptAllTrackChanges" /> <telerik:EditorTool Name="RejectAllTrackChanges" /> <telerik:EditorTool Name="EnableTrackChangesOverride" /> </telerik:EditorToolGroup> </Tools> </telerik:RadEditor> <telerik:RadEditor ID="RadEditor2" runat="server" ToolProviderID="RadEditor1" EnableTrackChanges="true" EnableComments="true"></telerik:RadEditor> <telerik:RadEditor ID="RadEditor3" runat="server" ToolProviderID="RadEditor1" EnableTrackChanges="true" EnableComments="true"></telerik:RadEditor>
<script>
var
$T = Telerik.Web.UI;
var
TOOLBAR_SELECTOR =
".reToolbar,.reToolBar"
;
$T.RadEditor.prototype._initializeToolProvider =
function
() {
var
editor =
this
;
var
toolProviderID = editor.get_toolProviderID();
var
provider = toolProviderID ? $find(toolProviderID) :
null
;
if
(!provider) {
return
;
}
var
getToolBarHolder =
function
(adapter) {
var
wnd = adapter.get_window();
return
wnd ? wnd.get_contentElement() : adapter.get_element();
};
var
toolAdapter = editor.get_toolAdapter();
var
providerToolAdapter = provider ? provider.get_toolAdapter() :
null
;
var
providerToolBarHolder = getToolBarHolder(providerToolAdapter);
var
providerToolBarElements = providerToolBarHolder ? $(providerToolBarHolder).find(TOOLBAR_SELECTOR) : [];
var
providerToolBarsLength = providerToolBarElements.length;
var
toolsFragment = document.createDocumentFragment();
editor.set_dialogOpener(provider.get_dialogOpener());
var
contextJSON = provider.get_contextMenusJSON();
if
(contextJSON && contextJSON.concat) {
editor.set_contextMenusJSON(contextJSON.concat([]));
}
var
modulesJSON = provider.get_modulesJSON();
if
(modulesJSON && modulesJSON.concat) {
editor.set_modulesJSON(modulesJSON.concat([]));
}
editor.set_toolJSON(provider.get_toolJSON());
toolAdapter.set_toolJSON(provider.get_toolAdapter().get_toolJSON());
var
toolBarContent = getToolBarHolder(toolAdapter);
for
(
var
i = 0; i < providerToolBarsLength; i++) {
$(providerToolBarElements[i]).clone().appendTo(toolsFragment);
}
$(toolBarContent).append(toolsFragment);
if
(provider.get_spellCheckJSON) {
editor.set_spellCheckJSON(provider.get_spellCheckJSON());
}
if
(provider.get_ajaxSpellCheckScriptReference) {
var
ref = provider.get_ajaxSpellCheckScriptReference();
if
(ref) {
editor.set_ajaxSpellCheckScriptReference(ref);
}
}
editor.set_links(provider.get_links());
editor.set_colors(provider.get_colors());
editor.set_fontNames(provider.get_fontNames());
editor.set_fontSizes(provider.get_fontSizes());
editor.set_symbols(provider.get_symbols());
editor.set_realFontSizes(provider.get_realFontSizes());
editor.set_snippets(provider.get_snippets());
editor.set_cssClasses(provider.get_cssClasses());
editor.set_cssFiles(provider.get_cssFiles());
editor.set_languages(provider.get_languages());
editor.set_paragraphs(provider.get_paragraphs());
editor.set_formatSets(provider.get_formatSets());
editor.set_enableUndoRedo(provider.get_enableUndoRedo());
}
</script>
<telerik:RadEditor RenderMode=
"Lightweight"
ID=
"RadEditor1"
runat=
"server"
...
<
telerik:RadEditor
RenderMode
=
"Lightweight"
runat
=
"server"
ID
=
"RadEditor1"
EnableTrackChanges
=
"true"
EnableComments
=
"true"
>
<
TrackChangesSettings
Author
=
"AuthorName"
CanAcceptTrackChanges
=
"true"
UserCssId
=
"reU0"
/>
<
Tools
>
<
telerik:EditorToolGroup
>
<
telerik:EditorTool
Name
=
"AcceptTrackChange"
/>
<
telerik:EditorTool
Name
=
"RejectTrackChange"
/>
<
telerik:EditorTool
Name
=
"AcceptAllTrackChanges"
/>
<
telerik:EditorTool
Name
=
"RejectAllTrackChanges"
/>
<
telerik:EditorTool
Name
=
"EnableTrackChangesOverride"
/>
</
telerik:EditorToolGroup
>
</
Tools
>
</
telerik:RadEditor
>
<
telerik:RadEditor
ID
=
"RadEditor2"
runat
=
"server"
ToolProviderID
=
"RadEditor1"
EnableTrackChanges
=
"true"
EnableComments
=
"true"
>
<
TrackChangesSettings
Author
=
"AuthorName"
CanAcceptTrackChanges
=
"true"
UserCssId
=
"reU0"
/>
</
telerik:RadEditor
>
<
telerik:RadEditor
ID
=
"RadEditor3"
runat
=
"server"
ToolProviderID
=
"RadEditor1"
EnableTrackChanges
=
"true"
EnableComments
=
"true"
>
<
TrackChangesSettings
Author
=
"AuthorName"
CanAcceptTrackChanges
=
"true"
UserCssId
=
"reU0"
/>
</
telerik:RadEditor
>
Hi Rumen,
I had initially raised this bug with ToolProviderID is this issue resolved and available in the 2019.1.115.45 version of the Telerik.Web.UI.dll.
Because i have taken the latest Update for Telerik and seems that without the extra attributes EnableTrackChanges="true" EnableComments="true" dont work for RADEditor control using ToolProviderID.