Title: execute shortcode in tinymce?
Last modified: August 20, 2016

---

# execute shortcode in tinymce?

 *  [markusk](https://wordpress.org/support/users/markusk/)
 * (@markusk)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/execute-shortcode-in-tinymce/)
 * as i’ve just been hunting for code for the tiles-thingy anyways i thought i’d
   look for a solution for the images not displaying in the wysiwyg-editor as well..
 * i’m no real coder, so i can’t tell if this really works or what effort it would
   be to implement, but jtlyk:
    [http://stackoverflow.com/questions/13687604/wordpress-shortcode-preview-in-tinymce](http://stackoverflow.com/questions/13687604/wordpress-shortcode-preview-in-tinymce)
 * cheerz.
 * [http://wordpress.org/extend/plugins/picasa-express-x2/](http://wordpress.org/extend/plugins/picasa-express-x2/)

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

 *  Plugin Contributor [gjanes](https://wordpress.org/support/users/gjanes/)
 * (@gjanes)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/execute-shortcode-in-tinymce/#post-3628881)
 * This is an interesting concept, and I could see the benefit. Although looking
   at the example code provided in that artcile, it appears to me that the shortcode
   isn’t actually being processed by wordpress, but instead the JS plugin for tinymce
   is processessing it.
 * Now, I already have some functionality in place to use an ajax request to process
   the shortcode and return it (for the option to return HTML instead of shortcode),
   so I could probably utilize that in a tinymce plugin of some kind.
 * But again it may be a matter of how much time it would take to implement, and
   also if it would have the desired outcome. I would be afraid that if I parsed
   the shortcode for the tinymce view, that if you did an update it would actually
   replace the shortcode in the post with the HTML… I’m not certain I know exactly
   how this would work, or how the built-in [caption] processing for tinymce works,
   as mentioned in that article.
 * Anyone else have any experience doing something like this?
 *  Plugin Contributor [gjanes](https://wordpress.org/support/users/gjanes/)
 * (@gjanes)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/execute-shortcode-in-tinymce/#post-3628885)
 * From the comments in that article you shared, it appears as though the “wpgallery”
   tinymce plugin performs such a task, and basically it appears to:
 * 1) before displaying the content in the visual editor, it calls a JS function
   that processes content to switch the [gallery ...] shortcode into the HTML img
   tags, etc.
    2) before saving the content on an “update”, it calls a JS function
   that processes the editor content and returns the HTML back to the shortcode 
   format.
 * So the real problem with that is the time it would take to do step #2. I could
   use ajax to have wordpress handle #1 fairly easily I would think. But reversing#
   1 back to shortcodes for #2 would be the tricky part.
 * It’s actually a shame that there isn’t a plugin for wordpress that does this 
   already, since this type of operation would be generic for any and all wordpress
   shortcodes.
 * Don’t know that such a thing would be feasible for this plugin alone given the
   amount of time I allocate to development on it.
 *  Thread Starter [markusk](https://wordpress.org/support/users/markusk/)
 * (@markusk)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/execute-shortcode-in-tinymce/#post-3628886)
 * yes.. instantly been looking for a plugin doing this myself, but it indeed seems
   there isn’t any..
 * i would love to help out, but as mentioned – i can’t code myself. i can read 
   code and hack around a bit, but just can’t write a single line from scratch..
 * anyways, it’s great you got it updated that far, let’s hope someone able to might
   give it some more pimping at some point..
 * thanks,
    markus.
 *  Thread Starter [markusk](https://wordpress.org/support/users/markusk/)
 * (@markusk)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/execute-shortcode-in-tinymce/#post-3628888)
 * actually i mainly miss the visual presentation for single images inserted via
   shortcode now – or rather less myself than people like my girlfriend doing the
   content for our swimming-team’s homepage. didn’t realize that using such thing
   like the above also would render whole galleries of course.. mh.
 * i know i could still switch back to the html-injection, but i’d much prefer going
   the futureproof way using the shortcode.
 * but well, maybe someone comes up with an idea one day.

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

The topic ‘execute shortcode in tinymce?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/picasa-express-x2.svg)
 * [Picasa and Google Plus Express](https://wordpress.org/plugins/picasa-express-x2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/picasa-express-x2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/picasa-express-x2/)
 * [Active Topics](https://wordpress.org/support/plugin/picasa-express-x2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/picasa-express-x2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/picasa-express-x2/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [markusk](https://wordpress.org/support/users/markusk/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/execute-shortcode-in-tinymce/#post-3628888)
 * Status: not a support question