[wp-trac] [WordPress Trac] #34882: make registered editor stylesheets available to frontend
WordPress Trac
noreply at wordpress.org
Sun Dec 6 21:03:48 UTC 2015
#34882: make registered editor stylesheets available to frontend
--------------------------------+-----------------------------
Reporter: ungestaltbar | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: 4.4
Severity: normal | Keywords:
Focuses: ui, administration |
--------------------------------+-----------------------------
Currently add_editor_style() does not register a style as of
theme.php:~1318
{{{
function add_editor_style( $stylesheet = 'editor-style.css' ) {
add_theme_support( 'editor-style' );
if ( ! is_admin() )
return;
...
}}}
For custom frontend usage of wp_editor, there is currently no way to
access any custom stylesheets because they are never registered.
The admin check could be moved to class-wp-editor.php:~564 like
{{{
if (is_admin() ) {
$editor_styles = get_editor_stylesheets();
if ( ! empty( $editor_styles ) ) {
foreach ( $editor_styles as $style ) {
$mce_css[] = $style;
}
}
}
}}}
That way, one could use 'mce_css' filter to manually add any custom
stylesheets back to the array of stylesheets.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34882>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list