Hello All,
We need to create HTML-based email templates. We are currently writing these manually using a special text-based editor. We are considering using FCKeditor for writing this. Our HTML-based email templates also utilize a special tag that is interpreted by a templating engine and replaced with live data from a database. A simple example of one of our email templates is like this:
<html>
<body>
<p>
<wintouch f1="Date">
</p>
<p>
Dear <wintouch f1="Contact Short Name">,
</p>
<p>
YOUR TEXT HERE:
</p>
<p>
Regards,
</p>
</body>
</html>
As you notice there is a special tag named "wintouch". When the templating engine comes accross a wintouch tag it replaces it with live data. For instance <wintouch f1="Contact Short Name"> would be replaced with the name of the person you are emailing.
Our current text-based editor lets us create wintouch tags by right clicking on the editing pane and choosing a wintouch tag option from the context menu that comes up. For instance, to insert the <wintouch f1="Contact Short Name"> tag into the HTML code you would choose Wintouch->Contact->Contact Short Name from the right-click context menu. Is it possible to create a plugin for FCKeditor that add this kind of functionality, namely, adding additional options to the right-click context menu that enable the user to conveniently add the special wintouch tag in the HTML code? We may consider using your services if you have a good idea how this could be done (if it can be done).
Another question I have is how FCKeditor allows a user to save the HTML file on to the user's local harddisk instead of the server. In our case the HTML files will be saved on the user's local harddisk. The sample demo examples do not save on the local harddisk and I couldn't figure out how this could be configured.
Thank you,
Mete Kural
Touchtone Corporation
We need to create HTML-based email templates. We are currently writing these manually using a special text-based editor. We are considering using FCKeditor for writing this. Our HTML-based email templates also utilize a special tag that is interpreted by a templating engine and replaced with live data from a database. A simple example of one of our email templates is like this:
<html>
<body>
<p>
<wintouch f1="Date">
</p>
<p>
Dear <wintouch f1="Contact Short Name">,
</p>
<p>
YOUR TEXT HERE:
</p>
<p>
Regards,
</p>
</body>
</html>
As you notice there is a special tag named "wintouch". When the templating engine comes accross a wintouch tag it replaces it with live data. For instance <wintouch f1="Contact Short Name"> would be replaced with the name of the person you are emailing.
Our current text-based editor lets us create wintouch tags by right clicking on the editing pane and choosing a wintouch tag option from the context menu that comes up. For instance, to insert the <wintouch f1="Contact Short Name"> tag into the HTML code you would choose Wintouch->Contact->Contact Short Name from the right-click context menu. Is it possible to create a plugin for FCKeditor that add this kind of functionality, namely, adding additional options to the right-click context menu that enable the user to conveniently add the special wintouch tag in the HTML code? We may consider using your services if you have a good idea how this could be done (if it can be done).
Another question I have is how FCKeditor allows a user to save the HTML file on to the user's local harddisk instead of the server. In our case the HTML files will be saved on the user's local harddisk. The sample demo examples do not save on the local harddisk and I couldn't figure out how this could be configured.
Thank you,
Mete Kural
Touchtone Corporation
Re: Need help on creating a plugin
Re: Need help on creating a plugin
FCK.InsertHtml('<span style=\"color:#000000; background-color:#FFFF00\" contenteditable="false">{{' + itemID + '}}</span>');
Mine is an ASP.NET project, so I can grab the HTML-formatted code using code-behind and write it out to any disk on the network to which I've been granted read/write authorization. In addition to retrieving FCKeditor.value to get the HTML, I'm also translating that HTML into XSL. Let's say the name of a data field in my template is Address1; then, if my HTML has an occurrence of
<span style=\"color:#000000; background-color:#FFFF00\" contenteditable="false">{{Address1}}</span>
I'll replace it with
<xsl:value-of select='Address1' />
Anyway, I take both the HTML and XSL versions along with other information and write it all out as one record in SQL Server (the HTML and XSL columns are defined as varchar(max)). The reason for using SQL Server is to allow maintaining a record of all previous versions of the same template in the event a form letter sent out using a previous version of the template needs to be correctly recreated. Anyway, when it's time to send out these form letters, the currently-active XSL version of the template is sent to a Windows Service along with a dataset containing the appropriate data for the form letters.
Re: Need help on creating a plugin
Thank you for your responses. Alfonso, the template engine is able to handle tags that are correctly terminated with a forward-slash as well: <wintouch f1="Date"/>. So FCKeditor can add the tags in the right form terminated with a forward slash and it will be fine.
AlBruAn, it sounds like you made a plugin very similar to what I need. Using the toolbar sounds fine too, it doesn't necessarily have to be a right-click context menu. For instance a drop-down in the toolbar might work fine as well. It's just that the right-click context menu also seems pretty convenient for the user. That's just the way the current version works. I attached a screenshot from the current simple template editor to give you an idea:
[img]templatecontextmenu.JPG[/img]
Is there anybody who would be interested in a small contract job to do this plugin for us? Please email me at metek@touchtonecorp.com
Thank you,
Mete Kural
Touchtone Corporation
Attachments: