Codex

Plugin API/Filter Reference/mce css

Contents

Description

The mce_css filter provides a method to add custom stylesheets to the TinyMCE editor window.

$mce_css is a comma separated list of stylesheet URIs.

The file can be a .php file, allowing dynamic generation of CSS rules for the content editor.

Theme Usage

If you are doing this from within a theme, use add_editor_style() instead.

Example

function plugin_mce_css( $mce_css ) {
	if ( ! empty( $mce_css ) )
		$mce_css .= ',';

	$mce_css .= plugins_url( 'editor.css', __FILE__ );

	return $mce_css;
}

add_filter( 'mce_css', 'plugin_mce_css' );

See Also

Related

This page is marked as incomplete. You can help Codex by expanding it.