Can't Get Editor To Render Fully

Last post 12-03-2013, 4:59 PM by CTietgen. 4 replies.
Sort Posts: Previous Next
  •  11-26-2013, 3:49 PM 78439

    Can't Get Editor To Render Fully

    I am trying to get the updated editor (with IE 11 fixes) working on our new server, but I'm having issue getting the toolbar and editor to render. The outline of the editor renders with the Normal, HTML and Preview tabs, but they don't do anything and the toolbar doesn't render at all.

     

    When I use "Inspect Element" on area where the toolbar should display, I see the following style being applied:

     

    style="display: none;"

     

    If I remove this style using the browser dev tools, then the toolbar renders correctly, but I can't type any text into the editor. I am using the same ASP code from our test environment, which renders the editor just fine, so I am not sure what could be wrong.

     

    Also, I created a test page (on the same server) that contains nothing but code to render an editor and it renders properly. 

  •  11-27-2013, 5:35 AM 78450 in reply to 78439

    Re: Can't Get Editor To Render Fully

    Hi CTietgen ,

     

    I think you may did not deployed the "cuteeditor_files" folder correct, can you delete the whole folder and copy it again? If still get this problem, please post the editor page url here. So we can check it for you.

     

    Also, you can send it to [email protected]

     

    Regards,

     

    Ken 

  •  11-27-2013, 9:26 AM 78452 in reply to 78450

    Re: Can't Get Editor To Render Fully

    NOTE: I fixed the code, for my purposes. See the FIX section below. 

     

    I wanted to test something this morning, so I opened out site on IE 10 and the editor renders correctly. On my computer I am running IE 11 and the editor isn't rendering. I have downloaded the  11-23-2013 file from your site, which I believe contains the fixes for IE 11.

     

    What's odd, is that I created a test page that does nothing but render the editor and it renders correctly, but Classic ASP pages within our MVC site won't render the editor. I've deleted the "cuteeditor_files" folder and added it back, but that's didn't fix things under IE 11.

     

    Unfortunately, I can't send you a link to our site, nor provide a sample project file. This appears to be some sort of odd IE 11 issue when using Classic ASP pages within a MVC framework.

     

    Follow Up 1: The editor renders correctly in our MVC framework using Chrome, Firefox and Safari, so this does appear to be an issue with IE 11. 

     

    Follow Up 2: When I used the IE 11 Developer Tools debugger, I get the following error under IE 11, which I believe I reported before via email and may explain why the editor doesn't render. The error occurs in the Element_GetAllElements. I have provided a screenshot below. NOTE: I don't get this javascript error when calling my test page, which is outside of the MVC framework.

     

    Loader.js Error Screenshot 

     

    In the error...

     

    p is [object HTMLDivElement]


    OxO6ac0[54] = "all"

    OxO6ac0[14] = "length" 

     

    Follow Up 3: Using IE 11, I changed the Document Mode from Edge to IE 10 and the editor renders correctly. Basically, in IE 10 p.all.length is valid, but in IE 11 it returns as "undefined". Under IE 10, the length = 176 elements within the DIV.

     

    Follow Up 4:  As a test, I edited Scripts/IE_Implementation/CuteEditorImplementation.js and removed the for loop in the section of code shown in the screenshot. So basically the Element_GetAllElements method just initialized the arr variable and returned it. This allows the editor to render in our MVC framework. I'll keep digging and see if I can find the offending HTMLDivElement that doesn't have a length or maybe I can put some kind of try/catch around the code.

     

    I hope all of the above helps resolve this issue. 

     

    ===FIX===

     

     Your Element_GetAllElements method: 

    1. function Element_GetAllElements(p) {  
    2.     var arr = [];  
    3.     for (var i = 0; i < p[OxOf4cf[54]][OxOf4cf[14]]; i++) {  
    4.         arr.push(p[OxOf4cf[54]].item(i));  
    5.     };  
    6.     return arr;  
    7. }
    My Element_GetAllElements method:

    1. function Element_GetAllElements(p) {  
    2.    var arr = [];  
    3.   
    4.    //see if the "all" property exists (IE 10), if not use getElementsByTagName (IE 11)  
    5.    var childElements = (typeof p.all == "undefined") ? p.getElementsByTagName("*") : p.all;  
    6.   
    7.    for (var i = 0; i < childElements.length; i++) {  
    8.       arr.push(childElements.item(i))  
    9.    };  
    10.    return arr  
    11. };  

  •  12-02-2013, 1:49 PM 78481 in reply to 78452

    Re: Can't Get Editor To Render Fully

    It's me again. :)

     

    NOTE: You can read everything I wrote below, but the important part is found under the IE 11 Change section below. 

     

    Though the fix I listed above allows the editor to render fully under IE 11, none of the buttons work now. The errors I'm getting now are listed below.

     

    Once again, these errors only happen when running IE 11 in Edge mode inside our MVC framework. The editor works just fine in IE 11/Edge outside of the MVC framework AND it works correctly in IE 10 mode inside our MVC framework. I'm not sure what our framework would be doing to prevent your editor from working, especially since it works fine in IE 10 mode within our framework.

     

    Error 1 

     

    Error 2 

     

    As you can see, both of these errors occur in a similar functions. Window_GetSelectionType and Window_GetSelectionNode_Core. Both of these functions try to access window.document.selection.type, which is undefined. Mainly due to the fact that window.document.selection is undefined.

     

    I'll try to find a workaround for this as well, but it would be nice if you guys had some input on these IE 11 issues.

     

    IE 11 Change

    As I mentioned above, your editor is getting an undefined error trying to access window.document.selection and the reason is that Microsoft has removed that property from IE 11. They suggest using getSelection instead. Do you know when you guys will fix this issue?

  •  12-03-2013, 4:59 PM 78497 in reply to 78481

    Re: Can't Get Editor To Render Fully

    Does anyone have an idea about a fix for what I reported above?

     

    getSelection doesn't have an easy way to check for the selection type (None, Text or Control) and that check is performed in various places in the editor source code. 

View as RSS news feed in XML