Reputation: 1567
Is it possible to use dynamic variables in tinyMCE?
Here's the use case I have in mind:
<img src="{imagepath}/logo.gif" />
or one is added programmatically using setContent().Upvotes: 1
Views: 2380
Reputation: 48620
Yes, refer to the TinyMCE template plugin for a javascript solution - it already does it: http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template
For a server side solution, just do a search and replace on the strings you want. This can be in a for loop or via a regular expression. If you decide to use the server side solution, the TinyMCE non-editable stuff can come in handy too.
Upvotes: 1