[wp-testers] Shortcodes in TinyMCE

Karl Wångstedt maillist at wangstedt.net
Tue May 26 13:42:34 GMT 2009


OK.

I take it that I need to do this in javascript as a plugin. I'll start  
making a plugin and will get back to you guys with the result.

Thank you a lot for the input. The bbcode plugin was a really good  
starting point.


25 maj 2009 kl. 11.00 skrev Andrew Ozz:

> 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
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


Vänligen
Karl Wångstedt
----------------------------------
          Wångstedt  nova
         www.wangstedt.net

Karl Wångstedt       0278-61 12 33
Stenhuggarvägen 3g   070-578 13 04
821 41  BOLLNÄS
----------------------------------
Det här brevet skickades med en Macintosh från Apple.
Garanterat virusfri med Mac OS X.


More information about the wp-testers mailing list