I have a need to provide 'canned' layouts for content editors. I certainly ues MasterPages and inheriting, but the layouts that I want to provide are snippets for boxes, callouts, tabular data, etc. I tried following this article in the Wiki:
But, I am not sure that it is the complete set of instructions. It doesn't seem to make any difference when adding the changes suggested. I found the tempalte plugin instruction on WikiPedia. They are extensive and I was wondering if Umbraco has any of this 'built in'?
I followed the instructions you link to, and the only problem i have had was that the extra stuff you have to put in the tinyMCE config file to describe the template files, need to be formatted in a special way to work.
Also if you have your templates in a folder under wwwroot, you need to add that folder to UmbracoReservedPaths in web.config.
But the button came up just as expected in the TinyMCE toolbar, and clicking it presents the dialog that lets you select a template.
I did the same steps but nothing seems to be different. After adding shouldn't there be an extra button in TinyMCE to choose a template? I looked at the Richtext editor datatype and I can't select any extra buttons. I'm new to TinyMCE templates so I could be wrong about the extra button :).
Already knew what I was doing wrong :). I didn't recycle the application pool / touch web.config to see the changes in the tinyMceConfig.config propogated. Updated the wiki with this message :).
TinyMCE Template(s)
Hi all,
I have a need to provide 'canned' layouts for content editors. I certainly ues MasterPages and inheriting, but the layouts that I want to provide are snippets for boxes, callouts, tabular data, etc. I tried following this article in the Wiki:
http://our.umbraco.org/wiki/how-tos/enabling-the-%27template%27-plugin-for-tinymce
But, I am not sure that it is the complete set of instructions. It doesn't seem to make any difference when adding the changes suggested. I found the tempalte plugin instruction on WikiPedia. They are extensive and I was wondering if Umbraco has any of this 'built in'?
Thanks all.
-- Nik
I followed the instructions you link to, and the only problem i have had was that the extra stuff you have to put in the tinyMCE config file to describe the template files, need to be formatted in a special way to work.
Also if you have your templates in a folder under wwwroot, you need to add that folder to UmbracoReservedPaths in web.config.
But the button came up just as expected in the TinyMCE toolbar, and clicking it presents the dialog that lets you select a template.
Mikael
Hmmm...can you share the config that you used for the tinyMCE file?Also, waht does your template file look like?
Thanks,
Nik
This was added to the <commands> section:
<command>
<umbracoAlias>Templates</umbracoAlias>
<icon>images/editor/template.gif</icon>
<tinyMceCommand value="" userInterface="true" frontendCommand="template">template</tinyMceCommand>
<priority>75</priority>
</command>
this was added to the <plugins> section:
<plugin loadOnFrontend="true">template</plugin>
This is how my <customconfig> section looks:
I have 3 very simple templates, thah just contains some <div> tags for styling 3 different coloumn layouts
The way the linebreaks are positioned is VERY important:
<customConfig>
<config key="entity_encoding">raw',
template_templates:[
{
title : "To spalter",
src : "/tinytemplates/twocols.txt",
description : "To spaltet layout"
},
{
title : "Tre spalter",
src : "/tinytemplates/threecols.txt",
description : "Tre spaltet layout"
},
{
title : "En spalte",
src : "/tinytemplates/threecols.txt",
description : "En spaltet layout"
}],
template_popup_height : '400</config>
</customConfig>
This is the entire contents of my 3 col template file:
<div class="col31">
</div>
<div class="col32">
</div>
<div class="col33">
</div>
Remember to put the folder the templates are in in the umbracoReservedPaths key in web.config (in my case: wwwroot/tinytemplates)
Hope this helps a bit
Mikael
Forgot to mention that my template files are plain txt files, not HTML or ASPX. I don't know if that is important.
Mikael
Awesome, thanks for clarifying. Will give this another shot.
-- Nik
Hello,
I did the same steps but nothing seems to be different. After adding shouldn't there be an extra button in TinyMCE to choose a template? I looked at the Richtext editor datatype and I can't select any extra buttons. I'm new to TinyMCE templates so I could be wrong about the extra button :).
Jeroen
Already knew what I was doing wrong :). I didn't recycle the application pool / touch web.config to see the changes in the tinyMceConfig.config propogated. Updated the wiki with this message :).
Jeroen
is working on a reply...