Graffiti Editor Templates
Category: Graffiti Tips
I was really excited when I saw the templates button in the Posts editor, since this is a great way to give control of the post layout to the content author, yet still have some control over the html.
With the help of Jamie at Telligent, I was able to find the templates. They are located in the __utility/Telligent_Editor folder in a file called tetemplates.xml.
The tetemplates.xml file contains a Template node for each template.The title and image attributes controls how the template appears in the pop-up that is displayed when the user clicks on the template icon in the editor. The Description node controls the description of the template in the pop-up. The Html node contains an CDATA section with the mark up.
Sample template:
<Templates imagesBasePath="te_template/images/">
<Template title="Image and Title" image="template1.gif">
<Description>One main image with a title and text that surround the image.</Description>
<Html>
<![CDATA[
<img style="MARGIN-RIGHT: 10px" height="100" alt="" width="100" align="left"/>
<h3>Type the title here</h3>
Type the text here
]]>
</Html>
</Template>
<Template title="Strange Template" image="template2.gif">
<Description>A template that defines two colums, each one with a title, and some text.</Description>
<Html>
<![CDATA[
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="50%">
<h3>Title 1</h3>
</td>
<td> </td>
<td width="50%">
<h3>Title 2</h3>
</td>
</tr>
<tr>
<td>Text 1</td>
<td> </td>
<td>Text 2</td>
</tr>
</tbody>
</table>
More text goes here.
]]>
</Html>
</Template>
The editor used is the powerful FCKEditor under the covers, so a visit to the FCKEditor web site can be very helpful and learning more about the capabilities of the editor.
