Change this:
ed.execCommand('mceInsertContent', 0, return_text);
To this:
ed.execCommand('mceInsertContent', false, return_text);
The second argument of the tinyMCE.execCommand() function is a boolean value that states if a UI needs to be presented to the user.
Reference:
http://www.tinymce.com/wiki.php/API3:method.tinymce.execCommand
Related Posts:
- How to add a shortcode button to the TinyMCE editor?
- How to load wp_editor via AJAX
- Custom media upload content for inserting custom post shortcode
- How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with WordPress 3.0 and up?
- TinyMCE Advanced newline problem
- How to generate expiring URL?
- Disable text tab on WordPress text-editor
- Open external links in a new window
- A plugin for having rel=”nofollow” in posts?
- How to attach Links into page/post or custom post type?
- How to set all external links to a certain domain to “nofollow”?
- Conditional Display of Links in Widgets
- How to add nofollow on all external links without plugin?
- Adding rich text editor to my plugin
- How do I customize my WordPress shortlink structure in link-template.php without a plugin?
- How to Add TinyMCE’s plugin in wordpress?
- White text on white background in TinyMCE when wp_editor is called in WP 3.9
- Tag link suggestion plugin
- How can I get the post content displayed in a text field that allows to edit posts?
- How to add custom JS to tinymce in wordpress
- how to load tinymce external plugin
- Custom height/width for thickbox in WP Backend
- Set WordPress TinyMCE Editor To Readonly
- Getting selected (highlighted) html from the Visual Editor on Edit Post page?
- How to add an image from web-link?
- SEO smart plugin not working for words ending with ä, ö, å
- Build a list of partners with Link, Logo and text
- How to edit content before post update
- WP Plugin for onpage link suggestions [closed]
- How to replace wordpress default text editor (TinyMCE) with a custom one.
- accessing wp.media api from a tinymce plugin
- How to load wp_editor via AJAX
- jquery tinymce and bundled wp plugins
- Trouble adding tiny mce to textarea in custom plugin
- Using TinyMCE in plugin?
- TinyMCE Styles Dropdown not adding html tags other than span
- How to add subcategories to the blogroll?
- Hook into existing tinyMCE button
- In Woocommerce theme need to add custom external link [closed]
- Any idea how to get something like this to work? [closed]
- How to add table class for tables of TinyMCE advanced wordpress plugin? [closed]
- Inserting shortcode in href – any ideas or workarounds?
- Need to change link URL embedded in multiple posts to new link URL
- track all external links on blog via username
- how to replace hostnames on certain external links?
- Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?
- Generate Own Custom CSS Button with icon
- How do I add multiple buttons to Tiny MCE in a single plugin?
- “switchEditors is not defined” with wp_editor() in jQuery UI tabs
- Example for use tinymce in wordpress 3.5.1?
- How to auto strip hyperlinks & images in wordpress post
- Custom characters of tinymce editor are saved as question mark
- “After file loaded” action
- How to disable tinyMCE button added by a plugin?
- Linked pages from plugin on front can’t see $wpdb
- Why the internal link get converted into a comment?
- How to apply to hide TinyMCE (wp_editor) on button click
- How to hide the cell properties and row properties in TinyMCE WordPress?
- WP search box on page not finding .PDF files
- .com creates automated link in post
- How to use wp_editor and save its data in wp_posts table
- Scroll to ID broken in main menu
- WordPress Thickbox Navigation Issue in Gallery
- How to disable/enable PHP plugin functionality based on a TinyMCE toggle-button
- Sanitize AROUND shortcode
- User Affiliate Token Generator?
- TinyMCE how to add css when inputing a text
- can’t use span or icon tags on when editing visual composer element
- Add Filter to get_next_posts_link
- Extending the “Add Media”-Dialog … how do I finally insert something to the Post?
- how to enable tinymce custom buttons in meta box?
- Better code/text editing for posts and pages?
- Filter html of WordPress editor in visual mode only
- How to Set Limit with WordPress Get Bookmarks Shortcode
- Using Iris Colorpicker on TinyMCE shortcodes page [duplicate]
- Can I have a link within a WP UI Spoiler
- Why links are not linked if edited comment?
- How to use Link Manager
- How do I add php to all links automatically?
- How to remove links generated by SEO-smart-links?
- How do I increase the 255 character limit on the ‘description’ field for link library links?
- Thumbnails and Lightbox
- How to block external download link access if visitor not referred from WP?
- How can I replace the built in WordPress editor?
- HTML link within my plugin settings page
- Simple Amazon Affiliate Plugin [closed]
- How to make temporary expiring link for a downloadable file
- WordPress Customise
- Continuous jQuery Slider / Carousel Plugin with linkable slides [for WooCommerce]
- claim a permalink and all sublinks in plugin
- How to append TinyMCE editor in TinyMCE editor’s popup
- TinyMCE – Unable to load the editor in vue front-end plugin page
- How to show the number of website visitors in my theme
- Bulk update wordpress posts
- redirected you too many times
- Create custom pages with a plugin
- the_post hook is not firing for me
- can we modify wordpress plugin version value to avoid update warning?
- WordPress checkbox and Illegal string offset
- dbDelta not adding additional columns in plugin database update