How to create custom toggle button in tinymce?
How to create custom toggle button in tinymce?
How to create custom toggle button in tinymce?
Quick Fix Answer: Add the below code to your theme functions.php file for a quick fix. Rest still trying to find the reason for this error so if you have any then welcome to comment here so I will mark your answer as accepted. /* ————————————————————————- * * Stop Executing Codes Inside Pre/Code Tags /* … Read more
There is an existing WordPress plugin that does this http://wordpress.org/extend/plugins/tinymce-templates/
This is a known bug with TinyMCE. That is the standard text editor in WP. When you hit refresh whilst editing a page it adds those tags to javascript. https://github.com/tinymce/tinymce/commit/5f320ac2acda15902b0488df1b7d85bf5c24ef94 However it is marked as fixed some time ago (2015) so perhaps your site is not up to date? Or of course perhaps it has … Read more
As far as I remember cleanup you are talking about is performed by JavaScript so it isn’t easy to mashup with PHP. It would probably be easier to make list of changes you want performed and do it with PHP (there are cleanup-related function available in it as well).
If fixed it with the great plugin from http://formidablepro.com site
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
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
A “workaround” that I found which made it work for me today is to add: define( ‘CONCATENATE_SCRIPTS’, false ); to the end of wp-config.php
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