How to get WP editors tinyMCE instances

If you wait for the SetupEditor event then you can access the editors: add_action( ‘admin_print_footer_scripts’, function () { ?> <script type=”text/javascript”> jQuery(function ($) { if (typeof tinymce !== ‘undefined’) { tinymce.on(‘SetupEditor’, function (editor) { if (editor.id === ‘contentLeft’) { // Could use new ‘input’ event instead. editor.on(‘change keyup paste’, function (event) { console.log(‘content=%s’, this.getContent()); }); … Read more

How to enable visual editor when editing comments on the dashboard?

If you are using WordPress 4.0+ you can do this using the wp_editor_settings and the global $pagenow to determine if you are on the comments page. add_filter( ‘wp_editor_settings’, ‘remove_editor_quicktags’, 10, 2 ); function remove_editor_quicktags( $settings, $id ){ global $pagenow; if ( $id == ‘content’ && $pagenow === ‘comment.php’ ){ $settings[‘quicktags’] = false; $settings[‘tinymce’] = true; … Read more

Registering custom TinyMCE buttons, for admin area, to work with custom instances of wp_editor

I copied your code into my functions.php, and added a simple admin panel (‘Foo’) to display the editor. Then I created a new directory inside my current theme for the editor button, and put the editor button JS into the relevant file: /wp-content/themes/[my-theme-dir]/tinymce_buttons/pH/editor_plugin.js. Result: when I went to Dashboard > Foo (the panel I’d created), … Read more

Remove specific buttons from wp_editor()

If you are using the settings API, you can use exactly the same code for calling wp_editor as you would anywhere else I’ve test the code below, it adds a setting section to the reading section, and then adds a field to the section containing a WYSIWYG editor with buttons limited to link, img and … Read more

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