Can you add the visual editor to the description field for custom taxonomies?

Just wrote the function. It’ll display the tinymce editor in every custom taxonomy description right now. Surely you can edit to show it for only some specific taxonomy. /** * Display advanced TinyMCE editor in taxonomy page */ function wpse_7156_enqueue_category() { global $pagenow, $current_screen; if( $pagenow == ‘edit-tags.php’ ) { require_once(ABSPATH . ‘wp-admin/includes/post.php’); require_once(ABSPATH . … Read more

WordPress 3.9 – Trouble Editing TinyMCE 4.0

The strings was new, not more for your requirements. This is the new content of the hook. array ( ‘selector’ => ‘#content’, ‘resize’ => ‘vertical’, ‘menubar’ => false, ‘wpautop’ => true, ‘indent’ => false, ‘toolbar1’ => ‘template,|,bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,wp_fullscreen,wp_adv’, ‘toolbar2’ => ‘formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help’, ‘toolbar3’ => ”, ‘toolbar4’ => ”, ‘tabfocus_elements’ => ‘insert-media-button,save-post’, ‘body_class’ => ‘content post-type-post post-status-draft post-format-standard’, … Read more

TinyMCE editor is breaking my beautiful HTML

Regardless of what you have configured as valid children, WordPress handles p tags as well as line breaks in a very unique way. You’ll probably notice eventually, if you haven’t already, that when switching from the text editor to the visual editor and back that your <p> tags get stripped, similar to what occurs on … Read more

Add CSS Class to Link in TinyMCE editor

One option is to add a class to the Styleselect menu in MCE. Adapted from the “TinyMCE Custom Styles” Codex page you first need to add the style select to the editor: // Callback function to insert ‘styleselect’ into the $buttons array function my_mce_buttons_2( $buttons ) { array_unshift( $buttons, ‘styleselect’ ); return $buttons; } // … Read more

How to customize TinyMCE4 in WP 3.9 – the old way for styles and formats doesn’t work anymore

If you look in class-wp-editor.php you’ll find that the filter you are using is still there, however the settings are different. self::$first_init = array( ‘theme’ => ‘modern’, ‘skin’ => ‘lightgray’, ‘language’ => self::$mce_locale, ‘formats’ => “{ alignleft: [ {selector: ‘p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li’, styles: {textAlign:’left’}}, {selector: ‘img,table,dl.wp-caption’, classes: ‘alignleft’} ], aligncenter: [ {selector: ‘p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li’, styles: {textAlign:’center’}}, {selector: ‘img,table,dl.wp-caption’, … Read more

Initialize TinyMCE editor / visual editor after AJAX insert

Did you manage to get the editor working without your javascript included? If so try to create a template what includes a working tinymce editor and then rewrite your javascript to copy that template using the WithDataAndEvents argument of the jQuery clone() function set to true. For example: $(‘.cloner’).click(function(){ $(‘.container’).append($(‘.template’).clone(true).removeClass(‘hidden’)); });

Add self-closing shortcode button to TinyMCE in WP 4.6

We start by adding the custom TinyMCE Button: function add_mce_button_custom_em() { // check user permissions if ( !current_user_can( ‘edit_posts’ ) && !current_user_can( ‘edit_pages’ ) ) { return; } // check if WYSIWYG is enabled if ( ‘true’ == get_user_option( ‘rich_editing’ ) ) { add_filter( ‘mce_external_plugins’, ‘add_tinymce_plugin_custom_em’ ); add_filter( ‘mce_buttons’, ‘register_mce_button_custom_em’ ); } } add_action(‘admin_head’, ‘add_mce_button_custom_em’); … Read more

How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with WordPress 3.0 and up?

Pre WP 3.3: http://www.dev4press.com/2010/tutorials/wordpress/tips/add-rich-text-editor-to-your-plugin/ If you are using WP 3.3 or later you might look up wp_editor: http://codex.wordpress.org/Function_Reference/wp_editor $settings = array( ‘teeny’ => true, ‘textarea_rows’ => 15, ‘tabindex’ => 1 ); wp_editor(esc_html( __(get_option(‘whatever_you_need’, ‘whatever’))), ‘terms_wp_content’, $settings);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)