Page 1 of 1

Use templates plugin in tinymce

Posted: Fri Jul 11, 2008 4:37 pm
by yabune
Anyone knows how to use tinymce templates plugin?

I tried to follow tinymce wiki instructions but without success...

Here is what I did:

1) Enabled templates plugin in tinymce extension configuration (inside cms admin)
2) Added templates tag to tinymce toolbar2 (inside cms admin)
3) In tinyconfig.tpl added the following code:

Code: Select all

template_templates : [
	{
		title : "template",
		src : "template.htm",
		description : "Adds Editors Name and Staff ID"
	}
]
4) upload template.htm to tinyconfig.tpl dir

The template icon now shows up in the toolbar, but when I click on it the templates listbox is empty, not populated...

I tried also to add the template_templates code to extra config (inside cms admin) instead, but didn't work.

Any help on this...

Thanks!!!

Re: Use templates plugin in tinymce

Posted: Tue Jul 15, 2008 10:14 am
by yabune
anyone can help me on this?

Re: Use templates plugin in tinymce

Posted: Thu Aug 14, 2008 10:00 pm
by jgeertsen
did you already solved the problem? I can't get it to work.

Re: Use templates plugin in tinymce

Posted: Sun Aug 31, 2008 5:23 am
by cyberman
yabune wrote: 3) In tinyconfig.tpl added the following code:

Code: Select all

template_templates : [
	{
		title : "template",
		src : "template.htm",
		description : "Adds Editors Name and Staff ID"
	}
]
It's a little bit difficult to add this cause tinyconfig.tpl will be parsed by Smarty. The {} should be masked by literal tags.

Re: Use templates plugin in tinymce

Posted: Thu Sep 04, 2008 3:32 pm
by BlueLaw
I'd really like to get this working too. I've done the same as Yabune but tried putting the code in the literal tags as was suggested, like this:

Code: Select all

  template_templates : [
	{literal} {
		title : "template",
		src : "template.htm",
		description : "Adds Editors Name and Staff ID"
	}{/literal}
]
Still for me the templates list is empty. Are people successfully using the template plugin? If so, please share how.

Thanks.

Re: Use templates plugin in tinymce

Posted: Sun Nov 09, 2008 2:21 pm
by gads
I made it work  ;D
I created a template and save it to the website's root folder, added the code to initialize tinyMCE on the extra config field (inside cmsms admin) and simply removed the line breaks.

Code: Select all

template_templates : [ { title : "Template Test", src : "template.htm", description : "Just testing" } ]