How to close tinymce inline popup
I figured it out. The window which was opened had to call the tinyMCEPopup.close() in its own scope. Which also meant I had to include the tiny_mce_popup.js script as well.
I figured it out. The window which was opened had to call the tinyMCEPopup.close() in its own scope. Which also meant I had to include the tiny_mce_popup.js script as well.
I suggest you to use htmlspecialchars() before sending content andhtmlspecialchars_decode() before showing content on page, here is functions that you need to copy/paste to your functions.php : function wp_po9568($content) { return htmlspecialchars($content); } add_filter(‘content_save_pre’,’wp_po9568′); And: function wp_po5689($content) { return htmlspecialchars_decode($content); } add_filter( ‘the_content’,’wp_po5689′); WordPress by default comments out php tags.
There are multiple options: Use a real table: <table><tr><td> and so on. Use pre-formatted text: <pre>text</pre> Switch to the HTML editor and enter HTML entities or numerical references for preserved white-space:  
Use wp_editor(). There are many configuration options; you have to read the source to get all of them. Example: $editor_settings = array ( ‘textarea_rows’ => 15, ‘media_buttons’ => FALSE, ‘teeny’ => TRUE, ‘tinymce’ => TRUE, ‘dfw’ => FALSE, ); $content = $get_option( ‘your_option_name’ ); wp_editor( $content, ‘your_editor_id’, $editor_settings );
switchEditors is written only to handle request between html, tmce, tinymce options. It’s no luck to extend it functionality. Better use of jQuery events like $(el).on(‘click, … ) // WP 3.8 build You can extend standard WordPress function in order to make some custom functionality like this: (function ( $ ) { “use strict”; $(function … Read more
So this is how I achieved what I was after – The filter ‘tiny_mce_before_init’ is used to update the settings of the editor, so you can add your own JS to the ‘setup’ key. add_filter(‘tiny_mce_before_init’, ‘initiate_tinyMCE_wordcount’); function initiate_tinyMCE_wordcount($initArray){ $initArray[‘setup’] = <<<JS [function(ed){ ed.onLoad.add(function(ed, e){ var tb_name = tinyMCE.activeEditor.id; // The ID of the active editor … Read more
I have tackled this by putting TinyMCE on the first tab, and making it a static tab, all others are still ajax, would still like it to be ajax, if anyone has any solutions. <div id=”tabs”> <ul id=”wpsca_ul”> <li><a href=”#wpsca_addedit” title=”add page”><?php echo __(‘Add Page’,’wpsca_lang’);?></a></li> <li><a href=”https://wordpress.stackexchange.com/questions/106799/<?php echo get_option(“siteurl’ ).’/?wpsca=wpscalist’;?>” title=”manage addedit”><?php echo __(‘Manage Pages’,’wpsca_lang’);?></a></li> … Read more
As just previously answered, your problem likely simply is that you used the same ID (the 2nd argument for wp_editor() multiple times).
Assuming you refer to the WP main editor, you can get the TinyMCE instance with var mainEditor = tinyMCE.getInstanceById(‘content’); then clear the current content with: mainEditor.setContent(”); and add your new content mainEditor.setContent(‘we are the borg lower your shields and surrender your ships’); If the new content doesn’t get saved, call tinyMCE.triggerSave(); additionally.
This is not a real problem as wordpress remembers all the addresses the content had during it existence and automatically redirects to the recent one. The code is not 100% fail prof but you will need to work very hard to make it fail. That is the reason you don’t need to update links in … Read more