This is a migrated thread and some comments may be shown as answers.

Allow resizing in 'Preview' EditMode

1 Answer 76 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Bernard
Top achievements
Rank 1
Bernard asked on 09 Apr 2014, 08:02 AM
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.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 09 Apr 2014, 11:43 AM
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.

 
Tags
Editor
Asked by
Bernard
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or