Allow resizing in 'Preview' EditMode

2 posts, 0 answers
  1. Bernard
    Bernard avatar
    5 posts
    Member since:
    Jun 2011

    Posted 09 Apr 2014 Link to this post

    Hi,

    Is there a way to enable resizing but only when in 'Preview' edit mode? At the moment, it seems that resizing only works when editor is in 'All' edit mode. When set to a specific edit mode, the bottom of the editor (which allows resizing) disappears.

    Thanks.
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 09 Apr 2014 Link to this post

    Hi Bernard,

    You can enable the modules when only one mode is set by toggling their visibility via a client-side logic fired on the OnClientLoad event of the editor.

    <telerik:RadEditor ID="RadEditor1" runat="server" EditModes="Preview" OnClientLoad="OnClientLoad">
    </telerik:RadEditor>
     
    <script type="text/javascript">
        function OnClientLoad(editor, args) {
            var resizeHandle = document.getElementsByClassName("reResizeCell")[0];
            var moduleWrapper = resizeHandle.parentNode;
     
            moduleWrapper.style.display = "";
            editor.repaint();
        }
    </script>


    Regards,
    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top