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

Radeditor in preview mode, need of the toggle full screen in R/O mode

3 Answers 220 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Suzy
Top achievements
Rank 2
Suzy asked on 13 Feb 2015, 02:24 PM
Hi,
I have a radgrid containing a radeditor per line.  The radeditor is set enabled and in previeuw mode.  I would like to add the toggle full screen button so the user can open the text in radeditor in fullscreen and R/O.

<telerik:RadEditor runat="server" ID="txtLogText" Enabled="false" EditModes="Preview" Height="140px" Width="1300px" ></telerik:RadEditor>

In attachment you can find a screen shot of the RadGrid so you can see that there is not  a lot space to see the content of the radeditor.  That's why we need the full screen modus.

Can you please help me?

Kind regards

Suzy

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 17 Feb 2015, 11:59 AM
Hello Suzy,

By default, the ToggleScreenMode mode is enabled. If you have a different/custom tools configuration, you should just add it to the Tools collection and when in Preview to enable it programmatically.

Example:
<telerik:RadEditor ID="Editor" runat="server" EditModes="Preview" OnClientLoad="OnClientLoad">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="ToggleScreenMode" />
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>
 
<script type="text/javascript">
    function OnClientLoad(sender, args) {
        var commandStates = Telerik.Web.UI.Editor.CommandStates;
        sender.get_toolAdapter().getToolByName("ToggleScreenMode").setState(commandStates.Off);
    }
</script>

If this does not help on the case, please provide more details what is the result needed. Also, the attached snapshot does not show the RadEditor, and I am unable to define what possibly is its configuration.

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.

 
0
Suzy
Top achievements
Rank 2
answered on 16 Sep 2015, 01:39 PM

I got this to work in februari.

But I just noticed that this is not working anymore.

 I'm currently working with 2015 Q2.

Can you please help me?

Kind regards

Suzy

0
Suzy
Top achievements
Rank 2
answered on 16 Sep 2015, 01:58 PM

I have found the solution : http://www.telerik.com/forums/toggle-mode-is-not-working-in-preview-mode-and-working-functionality-got-break-after-telerik-upgrade.

I changed my javascript and used OnClientModeChange instead of OnClientCommandExecuting :

function OnClientLoad(sender, args) {
 Telerik.Web.UI.RadEditor.prototype._nonEditableCommands.push("ToggleScreenMode");
 }
  
function OnClientModeChange(editor, args) {
 setTimeout(function () {
 editor.set_editable(false);
 editor.enableEditing(false);
 var tool = editor.getToolByName("ToggleScreenMode");
 tool.setState(0);
 }, 0);
 }

kind regards 

Suzy 

 

Tags
Editor
Asked by
Suzy
Top achievements
Rank 2
Answers by
Ianko
Telerik team
Suzy
Top achievements
Rank 2
Share this question
or