Title: TinyMCE Plugin to insert content into HTML View
Last modified: August 20, 2016

---

# TinyMCE Plugin to insert content into HTML View

 *  [Max Chirkov](https://wordpress.org/support/users/maxchirkov/)
 * (@maxchirkov)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-plugin-to-insert-content-into-html-view/)
 * One of my exisiting plugins utilizes TinyMCE plugin system. The plugin uses a
   TinyMCE Popup via Thickbox and inserts content into the Editor only in Visual
   View, but not in HTML View.
 * This is the code that inserts my content into the Visual Editor:
 *     ```
       window.tinyMCE.execInstanceCommand(
           window.tinyMCE.activeEditor.id,
           'mceInsertContent',
           false,
           content
       );
       ```
   
 * When I’m in HTML view, the plugin works, but when I click “Insert” the editor’s
   content textarea stays unchanged. No errors being displayed either.
 * Does anyone have an idea on how to make it to work with regular HTML Editor?
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [yoffegil](https://wordpress.org/support/users/yoffegil/)
 * (@yoffegil)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/tinymce-plugin-to-insert-content-into-html-view/#post-2560258)
 * Hi Max,
    I’m facing the same problem. Did you find a solution eventually?
 *  Thread Starter [Max Chirkov](https://wordpress.org/support/users/maxchirkov/)
 * (@maxchirkov)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/tinymce-plugin-to-insert-content-into-html-view/#post-2560259)
 * No, I don’t believe I did. I had a tiny pet project, which I abundant due to 
   lack of demand.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘TinyMCE Plugin to insert content into HTML View’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [html view](https://wordpress.org/support/topic-tag/html-view/)
 * [tinymce](https://wordpress.org/support/topic-tag/tinymce/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [Max Chirkov](https://wordpress.org/support/users/maxchirkov/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/tinymce-plugin-to-insert-content-into-html-view/#post-2560259)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
