I agree about the templates I'll have a look at the TinyMCE forum....
I did find a TinyMCE plugin which allows you to do pasting of snippits. I was thinking about pasting in the code for user defined plugins or modules or whatever e.g.
{cms_module module = "album"}
http://sourceforge.net/tracker/index.ph ... tid=738747
It is going to need a bit of work by somone who's knows javascript. Currently it will not accept the quotes for 'album' or '=' sign for the plugin example above. Of course reading what is installed and the default values would be good? Or perhaps just leave it to the web site creator?
UPDATE: A fix to do some of this:
To use the 'Tokens' (for module or other tags) you'd like to have in the list for insertion from a drop down list box in TinyMCE Editor,
a. Put the plugin in the plugin directory in the TinyMCE module folder - it's nested quite a way in... Go into TinyMCE admin and tick the 'token' plugin and add 'tokens' (minus the quotes) as a button to the toolbar, don't forget the commas if required. (This can all be pre-set.)
b. Edit 'editor_plugin_src.js' (plugin directory) in the function TinyMCE_tokens_getControlHTML(control_name)
alter
and change to (double '==')
c. Edit 'editor_plugin.js' ( plugin directory) and find the line.
Code: Select all
{if(/=/.test(tokens[i])){key_val=tokens[i].split('=');contentTxt+='<option
and change to (double '==')
Code: Select all
{if(/=/.test(tokens[i])){key_val=tokens[i].split('==');contentTxt+='<option
d. Add this to the TinyMCE.module.php under
auto_reset_designmode : "true",
Code: Select all
tokens_token_list:"Insert Album Module=={cms_module module='album'}; Insert News Module =={cms_module module='news' sortby='news_date'}",
If it is not the last line it will need a comma at the end. You can add more 'tokens' if you wish.
Please note the change from the original with the double '==' and single quotes for around the variables.
This just shows minimal options for News and the Album modules. Edit a page and try it out. It will insert where you put the cursor.
I'm sure someone could make a better job of this, it's a bit out of alignment - but then so was the original? I'm pretty rubbish at JavaScript!
Enjoy,
Russ