Themes Style in WordPress Editor
Written by Pera Tudt Tuesday, 23 February 2010 12:55
Problem: In Wordpress when you post or make page the style is not the same as on the actual page?
Solution:
- Go to theme foder and copy style.css to editor-style.css
- In the file functions.php after:
add_filter('comments_template', 'legacy_comments');
function legacy_comments($file) {
if(!function_exists('wp_list_comments')) : // WP 2.7-only check
$file = TEMPLATEPATH.'/legacy.comments.php';
endif;
return $file;
} - You have to insert:
add_filter('mce_css', 'my_editor_style');
function my_editor_style($url) {if ( !empty($url) )
$url .= ‘,’;// Change the path here if using sub-directory
$url .= trailingslashit( get_stylesheet_directory_uri() ) . ‘editor-style.css’;return $url;
} - Now you can open the WordPress editor and you should have the right style. You may need to remove some unessesary formats from editor-style.css ... i removed the black background only.

Xara Graphic Studio:





