Can’t remove   generated by editor from database

Non-breaking spaces are often added because they are present in word processing docs and then copied into the WP editor. I find the easiest way to remove them from a single post, including any unwanted formatting that results from copying text from a Word doc, is to copy the text (in visual editor mode) where … Read more

Insert dynamic listbox options in Tinymce popup editor

So the problem with the values helper was that it will only take array of objects and i was passing a string…I have corrected the code by passing an array of objects..Below is the corrected code.. body: [ { type: ‘listbox’, name: ‘type’, label: ‘Panel Type’, value: type, ‘values’: get_author_list(), tooltip: ‘Select the type of … Read more

TinyMCE Editor change underline button behavior – u tag instead of span text-decoration underline

After few days I got it to work. Gotta check those core files, now I know how. Anyways, here is the working code: function my_tiny_mce_tweaks( $first_init ) { $first_init[‘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”}},’ . … Read more

Add drop down in wordpress tiny mce editor pop up

See here, I think it’s enough for making any kind of TinyMCE Editor button with extended options like dropdown etc https://www.gavick.com/blog/wordpress-tinymce-custom-buttons Anyway if we came down to dropdown, checkbox and radio button on Popup, here is a demonstration. (function () { tinymce.PluginManager.add(‘aptmce_btn’, function (editor, url) { editor.addButton(‘aptmce_btn’, { text: ‘Add popup’, icon: false, onclick: function … Read more

How to add button in TinyMCE TEENY mode?

I solved it this way: /** * Plugin Name: customp * Description: some * Version: 1.0.0 * License: GPL-2.0+ * Text Domain: customp * Domain Path: /languages */ add_action(‘admin_head’, ‘_20161201_admin_head’); function _20161201_admin_head() { global $typenow; // check user permissions if ( !current_user_can(‘edit_posts’) && !current_user_can(‘edit_pages’) ) { return; } // verify the post type if( ! … Read more

Add a TinyMCE Core Plugin Using tiny_mce_before_init

Sorry to answer my own question, but of course I figured it out right after posting this. Instead of tiny_mce_before_init I needed to use mce_external_plugins. Also, I had to download TinyMCE from their website and copy the plugins/advlist folder to WordPress. I created a folder called mce in my WordPress plugins directory and pasted the … Read more

Stop WordPress Visual Editor converting backticks into code blocks

This has solved the problem, simply remove the plugin which automatically formats text as you type, from loading in the first place. add_filter( ‘tiny_mce_plugins’, ‘rwebster_editor_remove_wptextpattern’, 1, 99 ); function rwebster_editor_remove_wptextpattern( $plugins ) { $wptextpattern = array_search( ‘wptextpattern’, $plugins ); unset( $plugins[$wptextpattern] ); return $plugins; }

How to reset ‘Advance’ tab on table property?

To customize default styles: $styles = array(‘width’=>’100%’); $settings[‘table_default_styles’] = json_encode($styles); To disable advance tab: $settings[‘table_advtab’] = false; Complete code at functions.php: function bootstrap_classes_tinymce($settings) { // to customize more please visit: https://www.tiny.cloud/docs/plugins/table/#table_default_styles // Add bootstrap class inside <table> tag $classes = array( array( ‘title’ => ‘None’, ‘value’ => ” ), array( ‘title’ => ‘Table’, ‘value’ => … Read more

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