install tinymce plugin [closed]
There is an existing WordPress plugin that does this http://wordpress.org/extend/plugins/tinymce-templates/
There is an existing WordPress plugin that does this http://wordpress.org/extend/plugins/tinymce-templates/
The problem turned out to be that I added some custom javascript further down the page hat was somehow ruining the tinymce popup js. I wasn’t able to figure out exactly what was causing the problem, I needed to comment it out and it works okay now.
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
Here’s a simple function that will replace <em> with <i> on your post/page: function replace_em_with_i($content) { $content = str_replace(‘<em>’, ‘<i>’, $content); $content = str_replace(‘</em>’, ‘</i>’, $content); return $content; } add_filter(‘the_content’, ‘replace_em_with_i’); Warning: I have tested the code to check if it works (and it does work), but you might want to do some serious testing … 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
The wordpress editor is not an html editor, has never been, and it is literally not “marketed” as one since the 3.5 release. You can put a lot of work and replace it, but an “off the shelf” html editor will not be a good replacement without lots and lots of modifications, as the editor … Read more