Completed
Last Updated: 12 Aug 2015 10:17 by ADMIN
ADMIN
Ianko
Created on: 11 Jun 2015 11:08
Category: Editor
Type: Bug Report
1
The titles of the Paste HTML dialogs are updated with delay
Subsequent showing of an Paste HTML dialogs updates the title with some delay. 

A possible workaround is using the code from this example:

<telerik:RadEditor runat="server" ID="RadEditor1" OnClientCommandExecuted="OnClientCommandExecuted">
</telerik:RadEditor>

<script type="text/javascript">
    function OnClientCommandExecuted(editor, args) {
        var command = args.get_commandName();
        var dialogContainer = editor.get_dialogOpener()._dialogContainers;
        var dialogName = "";


        switch (command) {
            case "PasteFromWord":
            case "PasteFromWordNoFontsNoSizes":
            case "PasteAsHtml":
                dialogName = "CleanPasteHtmlContent";
                break;
            default:
                break;
        }

        dialogContainer[dialogName].add_pageLoad(updateTitle);
        dialogContainer[dialogName].add_show(updateTitle);
    }

    function updateTitle(sender, args) {
        var clientParameters = sender.ClientParameters;

        if (clientParameters && clientParameters.dialogTitle)
            sender.set_title(clientParameters.dialogTitle)

        sender.add_pageLoad(updateTitle);
        sender.add_show(updateTitle);
    }
</script>
0 comments