Toggle fullscreen in HTML mode

2 posts, 1 answers
  1. Naupad
    Naupad avatar
    23 posts
    Member since:
    Dec 2011

    Posted 23 Jan 2012 Link to this post

    I have 3 Rad Editors on my xyz.aspx page and the Toggle Fullscreen button works only for the Design View (mode). If I have enabled only HTML mode in my Rad Editor than the Toggle Full screen button is disabled.

    HELP!!!!!
  2. Answer
    Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 24 Jan 2012 Link to this post

    Hello,

    By design the Toggle Full Screen button works only in Design mode. You can enable this button in HTML mode using the following code:

    <telerik:radeditor runat="server" OnClientModeChange="OnClientModeChange" ID="RadEditor1"></telerik:radeditor>
    <script type="text/javascript">
        function OnClientModeChange(editor, args) {
            var mode = editor.get_mode();
            switch (mode) {
                case 1:
                    //alert( "We are in Design mode");
                    //do something
                    break;
                case 2:
                    setTimeout(function () {
                        var tool = editor.getToolByName("ToggleScreenMode");
                        tool.setState(0);
                    }, 0);
                    break;
                case 4:
                     
                    //alert( "We are in Preview mode");
                    //do something
                    break;
            }
        }
     </script>


    Kind regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top