[wp-testers] Shortcodes in TinyMCE

Andrew Ozz admin at laptoptips.ca
Mon May 25 09:00:57 GMT 2009


Austin Matzko wrote:
> On Mon, May 25, 2009 at 3:11 AM, Dion Hulse(DD32)
> <wordpress at dd32.id.au> wrote:
>> Yes.. Through a custom TinyMCE plugin. Have a look at how [gallery]
>> is rendered when inserted from the add-media page for example.
> 
> It uses a regular expression to replace the shortcode text with 
> markup, by attaching a callback to the TinyMCE onBeforeSetContent 
> event[1].

Will actually need two: one to replace the shortcode with html when 
loading, the other to replace that html with the shortcode when saving. 
Also check the bbcode TinyMCE plugin. It's included in the download: 
http://tinymce.moxiecode.com/download.php


More information about the wp-testers mailing list