wp_editor() in content that was loaded with ajax [duplicate]

Solution: Add wp_editor() in somewhere that works perfectly and hide it. <div class=”hidden-editor-container” style=”display:none;”> <?php wp_editor( ”, ‘editor’ ); ?> </div> after that assign editor contents to the global JS variable. EDITOR = $(‘.hidden-editor-container’).contents(); Finally when the ajax page is loaded append editor contents $(‘.editor’).append( EDITOR ); tinymce.execCommand( ‘mceRemoveEditor’, false, ‘editor’ ); tinymce.execCommand( ‘mceAddEditor’, false, … Read more

front post submit using wp_editor

If you want to add a new post without logging into the WordPress dashboard or allow your visitors a way to submit content of their own, you can do this by front end post submission. In this post I will show you the way to submit a post from the front end. Let’s start… You … Read more

WP_Editor Shortcode Issue

You can display shortcodes in WP editor by removing do_shortcode filter from the_content filter as shown in the following code but beware that it will also display shortcodes tags when you use the_content() function in the theme anywhere else in that case before the_content() function add do_shortcode filter again like this add_filter(‘the_content’, ‘do_shortcode’,15 ); function … Read more

How to add a nested shortcode into editor?

You can do it developing a TinyMCE plugin and load it using mce_external_plugins hook. The key is in the javascript file of the TinyMCE plugin which will be responsible to pass the nested shortcodes into the editor textarea. You can take a look to this article (about the middle they shows an example of how … Read more