Support » Alpha/Beta/RC » [wp_editor ] Distraction Free Mode Not Working Correctly

  • Resolved Nobble


    The new wp_editor function makes adding the tinymce editor quite easy it seems, so I’ve tried adding it on the front end of the P2 theme. Everything appears to be working correctly except for full screen mode (DFW). The fullscreen buttons do appear in Visual mode and as a quicktag, but clicking them doesn’t generate the fade effect going into dfw mode, i.e. the javascript api.on function found in wp-fullscreen.js, doesn’t fire. The HTML output associated with fullscreen mode is generated.

    I then tried using wp_editor in the back end I get the same results.

    I’ve tried using WP 3.3-RC1-19537 with setups using the p2 theme and twenty eleven on both a localhost installation as well as on a live domain. All scenarios are giving me the same results – in all cases I replicated the issue with no plugins activated.

    Is this a bug or a limitation?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jon Cave


    WordPress Dev

    Untested, but I believe you have to explicitly pass in the distraction free writing setting as true:

    $settings = array(
        'dfw' => true,
    wp_editor( 'foo', 'bar', $settings );

    Just to double check, by default is the standard TinyMCE fullscreen effect being used, or do you see no fullscreen at all?

    Alas, I tried specifying ‘dfw’ as true and also as false already (must say the source code comment for that setting is a big ambiguous as to what the setting actually accomplishes in the first place) and it doesn’t appear to make a difference.

    The quicktag button for fullscreen mode doesn’t do anything when you click it, and pressing the fullscreen button in visual mode will display the textarea fullscreen with some buttons at the top, but not the actual toolbar (which has its own buttons) and no fade effects, and the textarea content isn’t centered on the screen.

    Moderator Jon Cave


    WordPress Dev

    It looks like this it is a known limitation of the current implementation that extra editors cannot use distraction free writing, see and a couple of comments after it. I’ve asked someone more familiar with wp_editor() to check in here too in case they have further insight.

    Thanks Jon!

    It would be beautiful to have DFW working in the front end. Looking at what Ozz said in the ticket you linked to it might take awhile 🙁

    Yes, DFW is a special case as it needs specific DOM components and CSS. We may eventually get it to work everywhere but it’s not going to be very easy or clean.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[wp_editor ] Distraction Free Mode Not Working Correctly’ is closed to new replies.