Using main style.css with add_editor_style
All the resources I've read online suggest using a different CSS file (i.e. editor-style.css
) in order to style the WYSIWYG editor to better resemble what the actual content will look like.
For the purpose of testing I tried to just use the main style.css
file that I've been using for the rest of the site and the styling in the WYSIWYG editor looks great and so far I haven't noticed any problems by doing this.
Should I still create a new editor-style.css
and use that or is it an acceptable practice to use my main style.css
?
For reference, this is the code I used below:
function wysiwyg_styles() {
add_editor_style( 'style.css' );
}
add_action( 'init', 'wysiwyg_styles' );
Topic add-editor-style tinymce wysiwyg Wordpress
Category Web