Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start TinyMCE 4 in full screen mode?

Is there a way to start TinyMCE 4 in full screen mode? I just upgraded from TinyMCE 3.x, but the way it was done in 3.x does not seem to work in 4.x:

<head>
<script type="text/javascript" src="TinyMCE/tinymce.min.js"></script>
<script type="text/javascript">
  tinyMCE.init({
    oninit : function() {
      tinyMCE.get('editor').execCommand('mceFullScreen');
    }
  });
</script>
</head>

<body>
  <textarea id="editor"></textarea>
</body>

Any suggestions?

like image 409
Daniel Hedberg Avatar asked Apr 08 '14 14:04

Daniel Hedberg


People also ask

How do I resize TinyMCE?

max_width. This option sets the maximum width that a user can stretch the entire TinyMCE interface (by grabbing the draggable area in the bottom right of the editor interface). This behavior is different than the autoresize plugin, which controls the resizing of the editable area only, not the entire editor.


1 Answers

Found out how to do it:

<head>
<script type="text/javascript" src="TinyMCE/tinymce.min.js"></script>
<script type="text/javascript">
  tinyMCE.init({
    plugins: [ 'fullscreen' ],
    setup: function(editor) {
      editor.on('init', function(e) {
        editor.execCommand('mceFullScreen');
      });
    }
  });
</script>
</head>

<body>
  <textarea id="editor"></textarea>
</body>
like image 176
Daniel Hedberg Avatar answered Sep 20 '22 11:09

Daniel Hedberg