Changes between Version 1 and Version 2 of Ticket #36778, comment 9
- Timestamp:
- 02/27/2017 12:10:21 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36778, comment 9
v1 v2 2 2 > ...since the `mce_css` filter feels hacky. 3 3 4 No, it's the opposite :) `mce_css` is the best way to add or remove any style for the editor. This is the bestway for both themes and plugins. `add_editor_style()` was added later as "dumbed down hand-holding" for theme authors as apparently it is too hard for many of them to use filters... I didn't like the idea then, I dislike it even more now. As you mention lots and lots of themes use that to add all kinds of sub-standard CSS to the editor often breaking some functionality or making it behave unexpectedly.4 No, it's the opposite :) `mce_css` is the best way to add or remove any style for the editor. This is the proper way for both themes and plugins. `add_editor_style()` was added later as "dumbed down hand-holding" for theme authors as apparently it is too hard for many of them to use filters... I didn't like the idea then, I dislike it even more now. As you mention lots and lots of themes use that to add all kinds of sub-standard CSS to the editor often breaking some functionality or making it behave unexpectedly. 5 5 6 6 There are several ways to remove theme added stylesheets from the editor. The most straight-forward is: