add button to tinymce

Your method is complex… Here is simplest function to add BUTTON in TinyMCE: (insert this code in funcitons.php): add_action(‘admin_init’, function() { if (current_user_can(‘edit_posts’) && get_user_option(‘rich_editing’) == ‘true’) { add_filter(‘mce_buttons_2’, ‘register_buttonfirst’); add_filter(‘mce_external_plugins’, ‘add_pluginfirst’); } }); function register_buttonfirst($buttons) { array_push($buttons, “|”, “shortcode_button1” ); return $buttons;} function add_pluginfirst($plugin_array) {$plugin_array[‘MyPuginButtonTag’] = plugin_dir_url( __FILE__ ).’My_js_folder/1_button.php’;return $plugin_array;} add_filter( ‘tiny_mce_version’, ‘my_refresh_mceeee1’); function … Read more

Add new MCE button for toggle specific cell background color

I have found a great tutorial about making a custom button to the tinymce. http://qnimate.com/adding-buttons-to-wordpress-visual-editor/ You can just follow this guide and copy all of it. Don’t forget to activate your new plugin in the plugin menu (in admin panel). Then you can just change the code inside index.js and especially in the ed.addCommand(“green_command”, function() … Read more

Is there an alternative way to upload html without using TinyMCE?

WordPress does a handful of HTML clean-up tasks when you submit your post. Here are a few: “Texturize” the special characters Automatic paragraphs – for carriage returns Emoticons Special characters (like “&” and “<“) Removing script tags and other “unsafe” stuff You will want to investigate the Raw HTML plug-in which has some great provisions … Read more

Tinymce broken after update

There shouldn’t be a pt.js file in that directory. There wasn’t in 3.3.2 nor in 3.4. There’s several possible issues that could be taking place, but my guess is that your WordPress install has been compromised and your theme files are corrupted. They are then trying to access that js file which is no longer … Read more

WordPress and TinyMCE Advanced: Failed to load javascript

WP_PLUGIN_DIR customizes the location of files in filesystem. Most likely you also need to customize WP_PLUGIN_URL, which customizes client–facing URL location. If you omit this one, WP will decide it based on WP_CONTENT_URL, which might not at all point to your new location. Another possibility is that plugin/code in question simply cannot handle a custom … Read more

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