What is the recommended way of adding editor style in Beans child themes?
Hi Kanishk, where would the editor be used and what type of editor?
Apologies for not being clear. I meant the editor styling for the TinyMCE editor. The one that we usually add using add_editor_style functon.
I see Beans has beans_add_editor_assets added since version 1.2.5, so I was looking for the recommended apporach to add my own editor style in the child theme. Should I use add_editor_style directly or add via beans_add_editor_assets somehow?
Thanks for clarifying 🙂 At this stage, Beans adds mimimal styling to the editor, pretty much only the font style and size.
Yes in your child theme you would add your style using the WP core function
If you want to remove Beans editor styling, you may just add
beans_remove_action( 'beans_add_editor_assets' );
Hope that helps 🙂
Thanks Theirry. This surely helps!
Here is an example on adding editor style. It will then change how the content creation area looks in the backend when creating a new page or post. (I am adding it so whomever comes across this thread is able to see how it is done.)
I downloaded Twenty Sixteen theme and found the editor-style.css located inside the theme. Then copied the file to my own Beans child theme root folder. Here is the code that I am using:
// Add support for editor stylesheet - using twenty Sixteens editor stylesheet. add_editor_style( 'editor-style.css' ); // Remove beans editor styling beans_remove_action( 'beans_add_editor_assets' );
Another option is: https://carriedils.com/add-editor-style/