Re: How can I dynamically set the EditorBodyStyle from JavaScript?

  •  08-01-2013, 6:38 PM

    Re: How can I dynamically set the EditorBodyStyle from JavaScript?

    The dynamically set EditorBodyStyle is also being erased by the Create Image Map dialog.

     

    Reproduction steps:

    1. Open second example page provided by Kenneth.
    2. Click button to turn background red.
    3. Insert an image.
    4. Open the Create Image Map dialog.
      1. Oddly, the editor's page title is changed to NaN,NaN.
    5. Click the dialog's Cancel button to exit the dialog.
    6. The editor background turns white.

     

    I added some code to log to the console.

     

    RichTextEditor_OnExecCommand = function (rteEditor, info) {
        var cmd = info.Arguments[0];

        console.log("OnExecCommand, cmd = " + cmd);
    };
    RichTextEditor_OnExecUICommand = function (rteEditor, info) {
        var cmd = info.Arguments[1],
            thing = info.Arguments[0];

        console.log("OnExecUICommand, cmd = " + cmd + ", thing = " + thing);
    };

    When I ran the repro steps in Chrome, I saw the following log messages:

    OnExecUICommand, cmd = tabedit, thing = null
    OnExecCommand, cmd = tabedit
    OnExecUICommand, cmd = InsertGallery, thing = [object HTMLDivElement]
    OnExecUICommand, cmd = InsertImageMap, thing = [object HTMLDivElement] 

View Complete Thread