1. Home
  2. Wordpress
  3. Add editor style
#wordpress#php

Add this method to the function.php file. It will append a stylesheet file in the admin area of WordPress so you can add your custom CSS in the editor. Don't forget to update path to the file.

function add_editor_stylesheet() {
   add_editor_style( 'path/to/css/file.css' );
}
add_action( 'admin_init', 'add_editor_stylesheet' );
copy
Full Wordpress cheatsheet
Sitemap Git repository