[wp-trac] [WordPress Trac] #36985: Allow editor stylesheet on frontend
WordPress Trac
noreply at wordpress.org
Thu Jun 2 05:08:11 UTC 2016
#36985: Allow editor stylesheet on frontend
--------------------------+------------------------------------------------
Reporter: webmandesign | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Editor | Version: 4.5.2
Severity: normal | Resolution:
Keywords: | Focuses: ui, accessibility, administration
--------------------------+------------------------------------------------
Changes (by webmandesign):
* status: closed => reopened
* resolution: duplicate =>
Comment:
Adding an editor stylesheet(s) is responsibility of the theme, right?
In that case a plugin using the TinyMCE editor on frontend doesn't know
about what editor stylesheets the theme includes. So, using `mce_css`
filter in plugin doesn't make sense really.
Likewise, if the theme wants its editor stylesheets to be frontend
available, it should hook to `mce_css` right from the start. Then what
point there is to use `add_editor_style()`?
[https://github.com/WordPress/WordPress/pull/213 I've proposed the way]
which filters the `! is_admin()` conditional inside `add_editor_style()`,
so a theme can use `add_editor_style()` as usually, while a plugin which
uses TinyMCE editor on frontend can hook onto the conditional and change
it when needed so it allows theme editor stylesheets in frontend editor.
What do you think about that?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36985#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list