Check if TinyMCE 4.x is in Fullscreen Mode

tinymce

Solution

When TinyMCE is in Fullscreen Mode "mce-fullscreen" class is appended to body tag.

So all you need to do is check for the existence of mce-fullscreen class.

if $('.mce-fullscreen').length{

// Do something here,the editor is in fullscreen mode

}

Problem

Is there a way to check if TinyMCE is in fullscreen mode? I would like to press 'Esc' to exit full screen mode butI also use 'Esc' to cancel editing. Hence I would like a way to first check if the editor is in fullscereen mode.

Original source