0

I'm using wordpress 4 and want the fullscreen page editor to be just as wide as the text of my page. eg 1024px.

I tried setting #wp-fullscreen-wrap in my css and the dfw_width option but they all seem to be ignored.

1

You probably mean the Distraction Free Writing mode. Am I right? Then you changed wrong ID, it's #wp-content-editor-container what you want to edit. But every time you hack WordPress core, a kitten dies. So if you like kittens, here is no-offensive solution for you. Put this code into functions.php file in your theme:

<?php 
add_filter( 'admin_footer', 'fulleditorwidth', 99 );
function fulleditorwidth() { 
?>
    <style type="text/css">
    #wp-content-editor-container { width: 1024px!important }
    </style>

<?php } ?>

I recommend to add also max-width: 100% for responsive view.

Don’t hack your WordPress core files. If your wordpress will be updated, your changes will be overwritten.

1
  • Thanks.. I would never kill kittens, umm hack into the wpp core. This bit of code worked fine when i added your max-width to. Thanks alot – Bram Dec 10 '14 at 9:46
0
add_filter( 'admin_footer', 'fulleditorwidth', 99 );

function fulleditorwidth() { 
    echo '<style> #content_ifr { block;margin-left: auto;margin-right: auto;width: 70%!important;}</style>';
    echo '<style> .mce-fullscreen #wp-content-wrap .mce-edit-area, .mce-fullscreen #wp-content-wrap .mce-menubar, .mce-fullscreen #wp-content-wrap .mce-statusbar, .mce-fullscreen #wp-content-wrap .mce-toolbar-grp { margin-left: auto; margin-right: auto; padding: 0!important; width: 60%!important;}</style>';
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.