WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#28291 closed feature request (worksforme)

Tinmyce font-family, background-color, Styling - inherit

Reported by: Stagger Lee Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: TinyMCE Keywords:
Focuses: Cc:

Description

Please remove form core font-family and background-color for Tinymce. Let it inherit style of the themes. They are only things i ever change and custom CSS file doesnt work at the frontend, when you activate Tinymce for comments.

Or put in documentation more clear how to override it in functions.php. Using header.php and custom jQuery code is not convinient.

I lose unnaturally lots of time on each website to tweak Tinymce (at the front).

Thank you.

Change History (3)

#1 @azaozz
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

It depends on how you're adding TinyMCE for the comments. Generally you're in full control of all settings. If using wp_editor(), you can use all filters in WP_Editors to control it. If directly loading tinymce.min.js, set your option from JS in the init object. See the source of the examples for more info: http://www.tinymce.com/tryit/basic.php.

#2 @Stagger Lee
5 years ago

Is "init" for editor buttons/options, or for CSS styling of editor ?

#3 @Stagger Lee
5 years ago

Found an easy solution. But very, very difficult to Google it.

In code responsible to call editor in comments i added this:

'tinymce' => array( 
            'plugins' => $mce_plugins, 
            'content_css' => get_stylesheet_directory_uri() . '/editor-style-comments.css'
			)
wp_editor( '', 'comment', array(
    'textarea_rows' => 10,
    'teeny' => true,
    'quicktags' => true,
    'media_buttons' => false,
	'tinymce' => array( 
            'plugins' => $mce_plugins, 
            'content_css' => get_stylesheet_directory_uri() . '/editor-style-comments.css'
			)

Then just copied all lines from content-min.css and changed what i need.

As you can see even Justin Tadlock has problems with this.
http://wordpress.org/support/topic/customdynamic-css-in-tinymce?replies=18

Note: See TracTickets for help on using tickets.