Caught between a rock and a hard place with RadEditor?

5 posts, 0 answers
  1. chairman-mawh
    chairman-mawh avatar
    10 posts
    Member since:
    Jul 2017

    Posted 21 Aug 2017 Link to this post

    Hi Telerik support

     

    We use a rather old version of RadEditor (sorry) - v2011.1 and in many places on our site it's hidden initially until someone clicks the EDIT button. We've a few different problems with browsers:

    If I use it in ContentAreaMode=Iframe, it works with IE (IE is forced into IE9 mode by meta X-UA-compatible), but I encounter issues pasting content into it using Ctrl+V in firefox

    If I switch it to ContentAreaMode=Div, then i can paste in firefox, but clients that use IE11 complain that all the buttons above the editor box stop working. (I've verified the truth of this, http://www.telerik.com/forums/incorrect-rendering-of-radeditor-when-shown-with-ajax-in-initially-hidden-parent didn't seem to help). If I change the meta tag so that the browser runs in IE11 mode rather than IE9, the buttons work, but then the image manager fails (clicking the Select button to upload an image does nothing. The javascript console is full of errors like Sys.ArgumentOutOfRangeException: Value must be an integer.
    Parameter name: x Actual value was 0.75555555555555555555555).
    Image manager in IE11 native, in iframe mode is seriously graphically corrupt; only the top third of the modal window shows content/doesn't scroll properly/ borders are missing

    Elsewhere in this code I maintain there are patch/workarounds for other rad controls, like:

                   Telerik.Web.UI.RadListBox.prototype.saveClientState = function () {
                        var clientState = '{"logEntries":' + this._logEntriesJson + ',"selectedIndices":' + this._selectedIndicesJson + ',"checkedIndices":' + this._checkedIndicesJson + ',"scrollPosition":' + this._scrollPosition.toFixed() + "}";
                        return clientState;
                    };

    Where parameters that are expected to be integers are being sent by the browser as floats..

     

    It seems that for a long time and with the advent of new browsers, the default way of getting things working has been to patch a bit here, set some compatibility mode there, and I should probably attack the problem with a fresh approach; just wondering what that approach would be and whether it involves new versions of the telerik controls, or whether this old version can be made to work acceptably? I'm not sure how much budget there is in replacing the entire control suite at this time, when a planned rewrite of the the entire system, using newer rad controls is imminent, you see..

  2. chairman-mawh
    chairman-mawh avatar
    10 posts
    Member since:
    Jul 2017

    Posted 22 Aug 2017 in reply to chairman-mawh Link to this post

    Some updates:

     

    I downloaded the latest trial and switched to using it. I also removed the meta X-UA-equiv directive so my IE runs in native/latest document mode. I'm running ContentAreaMode=Div on all my RadEditors. I still encounter errors with RadEditors that start out life as hidden (i.e. inside a parent element that is hidden); the code that shows them DOES call .onParentNodeChanged() on the editor, but it doesn't seem to help.

    If the radeditor is visible on the page when it loads, then it seems to work OK. If the ContentAreaMode=Iframe then again, it seems to work OK but I've a requirement to use ContentAreaMode=Div because of firefox copy/pasting issues

    The context the RadEditor is used in is something like a forum. Looking at the code that shows the edit panel, I'm guessing there is only one editor on the page, and the DOM is manipulated to move it into a placeholder panel underneath an existing message if it's being used to edit an existing message - not sure if that's relevant

  3. Rumen
    Admin
    Rumen avatar
    14105 posts

    Posted 24 Aug 2017 Link to this post

    Hello,

    The onParentNodeChanged is applicable only in iframe content area mode.

    It is not clear enough what problems do you experience with the latest trial version, but if the problem happens only when the editor is initially hidden, you can place another rendered editor in a hidden part of the page like this:
    <div style="position:absolute;top:-10000;left:-10000">
             <telerik:radEditor id="RadEditor1" runat="server" />
    </div>

    Therefore the resources of all editors hidden and visible will be loaded and when you show the hidden editor the rendering problem should go away.

    Best regards,
    Rumen
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. chairman-mawh
    chairman-mawh avatar
    10 posts
    Member since:
    Jul 2017

    Posted 30 Aug 2017 Link to this post

    Hi Rumen

    Would you believe, after a long set of tweaking various things, it now works in IE.. great.. But the buttons have now stopped working in firefox! This is only for the editor that is initially hidden, there is a dummy one on the page as per your advice above. Both the dummy and the proper one are ContentAreaMode= Div. Any ideas why it stops working in firefox but starts working in IE?

  5. Rumen
    Admin
    Rumen avatar
    14105 posts

    Posted 01 Sep 2017 Link to this post

    Hi Matt,

    Are there any JS errors in Firefox console?
    Does the problem happen in ContentAreaMode="iframe"?
    It would be nice if you provide a simple working project that demonstrates the problem.

    Regards,
    Rumen
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top