Skip to content

Commit

Permalink
Merge pull request #274 from 10up/feature/remove-mce-styles
Browse files Browse the repository at this point in the history
Remove the TinyMCE editor styles
  • Loading branch information
darylldoyle authored Feb 27, 2025
2 parents b905f99 + dec3acb commit b427f92
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions mu-plugins/10up-plugin/src/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ public function can_register() {
public function register() {
add_action( 'admin_enqueue_scripts', [ $this, 'admin_scripts' ] );
add_action( 'admin_enqueue_scripts', [ $this, 'admin_styles' ] );

// Editor styles. add_editor_style() doesn't work outside of a theme.
add_filter( 'mce_css', [ $this, 'mce_css' ] );
}

/**
Expand Down Expand Up @@ -71,21 +68,4 @@ public function admin_styles() {
$this->get_asset_info( 'admin', 'version' ),
);
}

/**
* Enqueue editor styles. Filters the comma-delimited list of stylesheets to load in TinyMCE.
*
* @param string $stylesheets Comma-delimited list of stylesheets.
*
* @return string
*/
public function mce_css( $stylesheets ) {
if ( ! empty( $stylesheets ) ) {
$stylesheets .= ',';
}

return $stylesheets . TENUP_PLUGIN_URL . ( ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ?
'assets/css/frontend/editor-style.css' :
'dist/css/editor-style.min.css' );
}
}

0 comments on commit b427f92

Please sign in to comment.