Revealing ‘code’ hidden button in TinyMCE4 and WordPress 3.9.x
Finally I have find the answer to my question here. Seems like the WordPress Team forgot to add the TinyMCE4 ‘code’ plugin in the WordPress 3.9.1 release. Well, thanks to all!
Finally I have find the answer to my question here. Seems like the WordPress Team forgot to add the TinyMCE4 ‘code’ plugin in the WordPress 3.9.1 release. Well, thanks to all!
Custom shortcode editor [BackboneJS & TinyMCE)
To ajax this function you have hook it, so your function will be like this : function write_cat_list($cat){ $cats = get_categories(‘hide_empty=0’); if($cats) : $tinyMCE_list = array(); foreach ($cats as $cat) : $tinyMCE_list[] = array( ‘text’ => $cat->name , ‘value’ => $cat->term_id ); //write_cat_list($cat->term_id); endforeach; $jscode = json_encode($tinyMCE_list); //to convert from array to opject echo $jscode; … Read more
While I can’t see any major fault in doing the way I proposed initially especially in relation to translation and localization, what I realised while researching this issue was that I was asking an ajax question. Basically what’s the most efficient method to initialize the I18n components of wordpress. Short of making a custom ajax … Read more
Well, here’s what I found. It doesn’t quite explain why the editor was breaking, but it does explain how to add a button properly, without breaking the editor. The PHP code I was trying to add to functions.php actually needed to be added as a plugin. Combining directions from this StackExchange post and this tutorial, … Read more
TinyMCE errors after 3.7.1 to 3.9.1 upgrade
I am still experiencing with this, but here is how I got rid of the unwanted text area: if ( !is_admin() ) { //you might decide to change this conditional statement. //I found the filter in /wp-includes/class-wp-editor.php @249 add_filter(‘the_editor’, ‘my_remove_editor_te’); function my_remove_editor_te(){ $editor=””; return $editor; // or simply return; } } Here is how I … Read more
Filter html of WordPress editor in visual mode only
I use multiple templates, but also use code for some pages. For example, if I have a site with 3 sections, About, Products, and Research I would create page-about.php, page-products.php and page-research.php. These can be customized as necessary though usually they are simply pulling in unique sidebars which I want to include on all pages … Read more
ok so finally found a solution to this. i had to edit class-wp-editor.php and include the following for the $first_init array ‘setup’ => ‘function(ed) { ed.onGetContent.add(function(ed, o) { // Replaces all a characters with b characters o.content = o.content.replace(/\\\\/g, “\”); }); }’,