Access tinymce from thickbox
tinyMCE isn’t implemented as a jQuery plugin. I’m not sure, but this would be more probable: window.parent.tinyMCE.get(‘editor’).getContent()
tinyMCE isn’t implemented as a jQuery plugin. I’m not sure, but this would be more probable: window.parent.tinyMCE.get(‘editor’).getContent()
The first few you listed are not WordPress specific, and information about them can be found as follows: inlinepopups tabfocus paste media fullscreen As for the WordPress specific plugins, their source code is here (trac). There are no comments, but here’s my take based on a very cursory read through: wordpress: seems to setup the … Read more
Based on the tutorial you are missing the whole first step: add_filter( ‘mce_buttons_2’, ‘my_mce_buttons_2’ ); function my_mce_buttons_2( $buttons ) { array_unshift( $buttons, ‘styleselect’ ); return $buttons; }
I would use the hook tiny_mce_before_init : function wpse_106063_tinymce($arr){ $arr[‘theme_advanced_blockformats’] = ‘h1,h2,h3,h4’; $style_formats = array( array(‘title’ => ‘title’, ‘block’ => ‘h1’)), // etc ); $arr[‘style_formats’] = json_encode( $style_formats ); return $arr; } add_filter(‘tiny_mce_before_init’, ‘wpse_106063_tinymce’); Hope it helps. EDIT: add something that should work, not tested. source
I have decided that the best solution is to just disable the visual editor, from Users -> Your Profile -> Disable visual editor when writing.
I’m not sure if there is an official way to do this in TinyMCE 4.0 or not, I can’t find any references in their docs or on WordPress – below is a PHP method you could use to do this: function myformatTinyMCE($in) { $del_buttons = array(‘bold’, ‘italic’, ‘strikethrough’); $temp = explode(‘,’, $in[‘toolbar1’]); foreach($del_buttons as $del){ … Read more
This is kind of a 2-parter. The first half will show you how to change the style inside TinyMCE when editing. The second half will show you how to remove things from the toolbar. Style TinyMCE WordPress give us a neat little function called add_editor_style() which accepts an array of stylesheets, either by URL or … Read more
The simplest answer is: you can use whatever stylesheet you want for the editor. editor-style.css is just the default stylesheet loaded if none is passed to add_editor_style(). This will load the specified stylesheet: add_editor_style( ‘some-stylsheet.css’ ); This will load editor-style.css: add_editor_style(); Use whatever better fits your needs. By the way, it is better practice to … Read more
I suspect that clicking the Select Image button on the popup is changing the underlying insertion point or selection in the main editor, but I can’t for the life of me see how I can fix it. I’m afraid I don’t know why exactly the issue happens only when the image is changed, but I … Read more
Solved it by adding this to wp-config.php, which kills the js combining. define( ‘CONCATENATE_SCRIPTS’, false );