Completed
Last Updated: 02 Oct 2019 14:29 by ADMIN
SUNIL
Created on: 15 Jul 2019 10:24
Category: Editor
Type: Bug Report
0
args.get_commandName is not a function error when executing a tool command in a mobile editor
Test the code below on iPhone and mobile chrome/safari and you'll get a JS error:

<script type="text/javascript">
    EditorCommandList = Telerik.Web.UI.Editor.CommandList;
    EditorCommandList["ApplySizeColor"] = function (commandName, editor, args) {
        if (editor.getSelectionHtml() != "") {
            editor.fire("FontSize", { value: "4" }); //fire the FontSize command
            editor.fire("ForeColor", { value: "red" });  //fire the ForeColor command
        }
        else {
            alert("Please, select some text!");
            args.set_cancel(true);
        }
    };
 </script>
<telerik:RadEditor ID="RadEditor1" runat="server" RenderMode="Auto" NewLineMode="Br" ContentAreaMode="Div" Height="500" Width="100%" Skin="Metro" _OnClientCommandExecuting="OnClientCommandExecuting">
    <HeaderTools>
        <telerik:EditorHeaderTool Name="ApplySizeColor" />
        <telerik:EditorHeaderTool Name="Redo" />
        <telerik:EditorHeaderTool Name="MobileEdit" Position="Right" />
        <telerik:EditorHeaderTool Name="ToggleScreenMode" Position="Right" />
    </HeaderTools>
    <Tools>
        <telerik:EditorToolGroup>
                <telerik:EditorTool Name="ApplySizeColor" Text="Apply Size and Color" ShowText="true"></telerik:EditorTool>
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>
1 comment
ADMIN
Rumen
Posted on: 15 Jul 2019 10:25
Hi Sunil,

Thank you for reporting the bug.

It will be fixed in R3 2019.

As a small token of gratitude for your bug report, I updated your Telerik points!

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.