WordPress.org

Support

Support » Plugins and Hacks » Backend editor – content width

Backend editor – content width

  • I have made some hack into functions.php of the theme:

    function mcekit_editor_style($url) {
    if ( !empty($url) )	$url .= ',';
    $url .= trailingslashit( get_bloginfo('url') ) . 'css/layout.css,' ;
    return $url;
    }
    if ( is_admin() ) {add_filter('mce_css', 'mcekit_editor_style');}

    So it allows me to load my theme .css and see styles in tinymce editor.
    But the problem was, to make editors width same, as content on page, so I have made a little line:
    body.mceContentBody {width: 960px; border: 1px solid black;}
    and it work great…. it shows black border around content that just fits content size on page. It allows to visually compose images, text etc. But the problem is… that it indeed works in firefox and opera, but it has 100% width in ie8.
    Also the method I have did works ok, when browser size is 1024 (normally I use hd screen format) – horizontal scrollbar appears, and content doesn’t shrink.

    I have tried to force editor window (#postdivrich) width, but it looks bad in screen resolution width 1024 and less :/.

    Any idea how to correct this issue (or change editors width diffrently)?

Viewing 1 replies (of 1 total)
  • Where did you add the following?

    body.mceContentBody {width: 960px; border: 1px solid black;}

    In your theme’s css, or custom css, file?

Viewing 1 replies (of 1 total)
  • The topic ‘Backend editor – content width’ is closed to new replies.