<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>TLS Web Solutions &#187; magento extension</title> <atom:link href="http://www.tlswebsolutions.com/tag/magento-extension/feed/" rel="self" type="application/rss+xml" /><link>http://www.tlswebsolutions.com</link> <description></description> <lastBuildDate>Thu, 02 Jun 2011 20:41:14 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.3</generator> <item><title>Magento Fontis FCKeditor WYSIWYG Transactional Email</title><link>http://www.tlswebsolutions.com/magento-fontis-fckeditor-wysiwyg-transactional-email/</link> <comments>http://www.tlswebsolutions.com/magento-fontis-fckeditor-wysiwyg-transactional-email/#comments</comments> <pubDate>Thu, 13 Aug 2009 04:18:52 +0000</pubDate> <dc:creator>Tim Selaty</dc:creator> <category><![CDATA[Magento]]></category> <category><![CDATA[Miscellaneous]]></category> <category><![CDATA[fck editor]]></category> <category><![CDATA[fck wysiwyg]]></category> <category><![CDATA[fckeditor]]></category> <category><![CDATA[fontis]]></category> <category><![CDATA[fontis extension]]></category> <category><![CDATA[magento extension]]></category> <category><![CDATA[new email template]]></category> <category><![CDATA[template text]]></category> <category><![CDATA[template_text]]></category> <category><![CDATA[transactional email wysiwyg]]></category> <category><![CDATA[wysiwyg]]></category><guid isPermaLink="false">http://www.tlswebsolutions.com/?p=194</guid> <description><![CDATA[Fontis has released an extension for Magento (1.3.2.3 at the time of writing this) that allows for a [...]]]></description> <content:encoded><![CDATA[<p>Fontis has released an extension for Magento (1.3.2.3 at the time of writing this) that allows for a WYSIWYG (What you see is what you get, aka, a MS Word like editor) for various sections of Magento. This generally allows you to format and style your product descriptions, category descriptions, etc. Only one problem, it doesn&#8217;t work in every section of Magento.<span id="more-194"></span></p><p>In the newest release of Fontis for Magento (1.1.0), <strong>Lloyd Hazlett </strong>has informed me that they&#8217;ve added a WYSIWYG by default to the Transactional Emails page. Way to go guys! Keep up the great work! For those who want to see how it was done, keep scrolling.<br /> <a title="Fontis, IT Consulting, Development and eCommerce" href="http://www.fontis.com.au/">http://www.fontis.com.au/</a> and <a href="http://www.magentocommerce.com/extension/586/fontis-wysiwyg-editor">http://www.magentocommerce.com/extension/586/fontis-wysiwyg-editor</a></p><p>One of the biggest issues / requested fixes for Fontis&#8217;s FCKeditor is to have it display the WYSIWYG editor in the Transactional Emails section [System -&gt; Transactional Emails]. The following image is what the editor normally displays as (the undesired and raw one).</p><p><img class="aligncenter size-full wp-image-196" title="fck-2" src="http://www.tlswebsolutions.com/wp-content/uploads/2009/08/fck-2.gif" alt="fck-2" width="656" height="449" /></p><h3>The Diagnosis and Cure</h3><p>As you might guess, adding in raw text and trying to format it with HTML is fairly difficult. There are two ways to enable the editor on the Transactional Emails page.</p><p><strong>The First:</strong><br /> On the Admin page [System -&gt; Configuration -&gt; Admin] you will see &#8220;WYSIWYG Editor&#8221;. Make sure in the Editor Type field that &#8216;FCKeditor&#8217; is selected. In the Editable Areas, click the &#8216;Add textarea CSS ID&#8217; button and a dialog will expand.</p><p>In the dialog, add &#8220;template_text&#8221; into the text box. After adding in the text, save the page. The textarea on the transactional emails page should work. However, if you&#8217;re like me and never happen to be graced with such luck&#8230; you have to do the  recommended alternative, adding it in manually. See the next step for directions.</p><p><strong>The Second (recommended):<br /> </strong>In the case of the first step now working, we&#8217;re going to add a new region to the selectable area&#8217;s in the editor. Not sure what I mean? Below is a screenshot of all the currently selectable areas in the editor.</p><p><img class="aligncenter size-full wp-image-195" title="fck-1" src="http://www.tlswebsolutions.com/wp-content/uploads/2009/08/fck-1.gif" alt="fck-1" width="532" height="473" /></p><p>As you can see we currently have 6 selectable areas. If you click on any of the items in the blue you&#8217;ll notice that all the others deselect back to white. In order for the all of the editable regions to have WYSIWYG editors, you must select them all. You can do this by holding CTR and clicking all of the listed items until they are all highlighted blue.</p><p>You&#8217;ll need FTP access in order to manually add a new selectable item. With your FTP client open browse to &#8216;/app/code/community/Fontis/Wysiwyg/Model/Source/Editableareas.php&#8217;.</p><p>With Editableareas.php open, replace:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;color: #003d68;"> <span style="color: #0000ff;">'description'</span><span style="color: #339933;color: #000080;">,</span>             <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Product Description'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'short_description'</span><span style="color: #339933;color: #000080;">,</span>       <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Product Short Description'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'page_content'</span><span style="color: #339933;color: #000080;">,</span>            <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'CMS Page Content'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'block_content'</span><span style="color: #339933;color: #000080;">,</span>           <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Static Block Content'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'_generaldescription'</span><span style="color: #339933;color: #000080;">,</span>     <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Category Description'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'text'</span><span style="color: #339933;color: #000080;">,</span>                    <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Newsletter Template'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
<span style="color: #009900;color: #000080;">&#125;</span>
<span style="color: #009900;color: #000080;">&#125;</span></pre></div></div><p>With:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;color: #003d68;"> <span style="color: #0000ff;">'description'</span><span style="color: #339933;color: #000080;">,</span>             <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Product Description'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'short_description'</span><span style="color: #339933;color: #000080;">,</span>       <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Product Short Description'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'page_content'</span><span style="color: #339933;color: #000080;">,</span>            <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'CMS Page Content'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'block_content'</span><span style="color: #339933;color: #000080;">,</span>           <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Static Block Content'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'_generaldescription'</span><span style="color: #339933;color: #000080;">,</span>     <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Category Description'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'text'</span><span style="color: #339933;color: #000080;">,</span>                    <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Newsletter Template'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #990000;color: #FF0000;">array</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> <span style="color: #0000ff;">'template_text'</span><span style="color: #339933;color: #000080;">,</span>           <span style="color: #0000ff;">'label'</span> <span style="color: #339933;color: #000080;">=&amp;</span>gt<span style="color: #339933;color: #000080;">;</span> Mage<span style="color: #339933;color: #000080;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'fontis_wysiwyg'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">-&amp;</span>gt<span style="color: #339933;color: #000080;">;</span>__<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #0000ff;">'Template Text / Transactional Emails'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
<span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
<span style="color: #009900;color: #000080;">&#125;</span>
<span style="color: #009900;color: #000080;">&#125;</span></pre></div></div><p>We just added a new item to the array called &#8220;template_text&#8221;.</p><p>Next, browse to and open &#8216;/app/design/adminhtml/default/default/template/system/email/template/edit.phtml&#8217;.</p><p>With Edit.phtml open, replace:</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #003d68;"><span style="color: #003366; font-weight: bold;color: #000080;">new</span> Ajax.<span style="color: #660066;">Request</span><span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">action</span><span style="color: #339933;color: #000080;">,</span> <span style="color: #009900;color: #000080;">&#123;</span>
               parameters<span style="color: #339933;color: #000080;">:</span> Form.<span style="color: #660066;">serialize</span><span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span> <span style="color: #003366; font-weight: bold;color: #000080;">true</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
               area<span style="color: #339933;color: #000080;">:</span> $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
               onComplete<span style="color: #339933;color: #000080;">:</span> <span style="color: #003366; font-weight: bold;color: #000080;">function</span> <span style="color: #009900;color: #000080;">&#40;</span>transport<span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                   <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>transport.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">isJSON</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                       <span style="color: #003366; font-weight: bold;color: #000080;">var</span> fields <span style="color: #339933;color: #000080;">=</span> $H<span style="color: #009900;color: #000080;">&#40;</span>transport.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">evalJSON</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                       fields.<span style="color: #660066;">each</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #003366; font-weight: bold;color: #000080;">function</span><span style="color: #009900;color: #000080;">&#40;</span>pair<span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                          <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                              $<span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;color: #000080;">=</span> pair.<span style="color: #660066;">value</span>.<span style="color: #660066;">strip</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                          <span style="color: #009900;color: #000080;">&#125;</span>
                          <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span> <span style="color: #339933;color: #000080;">==</span> <span style="color: #3366CC;color: #000080;">'template_type'</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                              <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">value</span> <span style="color: #339933;color: #000080;">==</span> <span style="color: #CC0000;color: #000080;">1</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                                  <span style="color: #000066; font-weight: bold;color: #000080;">this</span>.<span style="color: #660066;">typeChange</span> <span style="color: #339933;color: #000080;">=</span> <span style="color: #003366; font-weight: bold;color: #000080;">true</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button_back'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                              <span style="color: #009900;color: #000080;">&#125;</span> <span style="color: #000066; font-weight: bold;color: #000080;">else</span> <span style="color: #009900;color: #000080;">&#123;</span>
                                  <span style="color: #000066; font-weight: bold;color: #000080;">this</span>.<span style="color: #660066;">typeChange</span> <span style="color: #339933;color: #000080;">=</span> <span style="color: #003366; font-weight: bold;color: #000080;">false</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button_back'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                              <span style="color: #009900;color: #000080;">&#125;</span>
                          <span style="color: #009900;color: #000080;">&#125;</span>
                       <span style="color: #009900;color: #000080;">&#125;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #000066; font-weight: bold;color: #000080;">this</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                   <span style="color: #009900;color: #000080;">&#125;</span>
               <span style="color: #009900;color: #000080;">&#125;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #000066; font-weight: bold;color: #000080;">this</span><span style="color: #009900;color: #000080;">&#41;</span>
            <span style="color: #009900;color: #000080;">&#125;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span></pre></div></div><p>With:</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #003d68;"><span style="color: #003366; font-weight: bold;color: #000080;">new</span> Ajax.<span style="color: #660066;">Request</span><span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">action</span><span style="color: #339933;color: #000080;">,</span> <span style="color: #009900;color: #000080;">&#123;</span>
               parameters<span style="color: #339933;color: #000080;">:</span> Form.<span style="color: #660066;">serialize</span><span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span> <span style="color: #003366; font-weight: bold;color: #000080;">true</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
               area<span style="color: #339933;color: #000080;">:</span> $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
               onComplete<span style="color: #339933;color: #000080;">:</span> <span style="color: #003366; font-weight: bold;color: #000080;">function</span> <span style="color: #009900;color: #000080;">&#40;</span>transport<span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                   <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>transport.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">isJSON</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                       <span style="color: #003366; font-weight: bold;color: #000080;">var</span> fields <span style="color: #339933;color: #000080;">=</span> $H<span style="color: #009900;color: #000080;">&#40;</span>transport.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">evalJSON</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                       fields.<span style="color: #660066;">each</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #003366; font-weight: bold;color: #000080;">function</span><span style="color: #009900;color: #000080;">&#40;</span>pair<span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                          <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                              $<span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;color: #000080;">=</span> pair.<span style="color: #660066;">value</span>.<span style="color: #660066;">strip</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                          <span style="color: #009900;color: #000080;">&#125;</span>
                          <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span> <span style="color: #339933;color: #000080;">==</span> <span style="color: #3366CC;color: #000080;">'template_type'</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                              <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">value</span> <span style="color: #339933;color: #000080;">==</span> <span style="color: #CC0000;color: #000080;">1</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                                  <span style="color: #000066; font-weight: bold;color: #000080;">this</span>.<span style="color: #660066;">typeChange</span> <span style="color: #339933;color: #000080;">=</span> <span style="color: #003366; font-weight: bold;color: #000080;">true</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button_back'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                              <span style="color: #009900;color: #000080;">&#125;</span> <span style="color: #000066; font-weight: bold;color: #000080;">else</span> <span style="color: #009900;color: #000080;">&#123;</span>
                                  <span style="color: #000066; font-weight: bold;color: #000080;">this</span>.<span style="color: #660066;">typeChange</span> <span style="color: #339933;color: #000080;">=</span> <span style="color: #003366; font-weight: bold;color: #000080;">false</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button_back'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                              <span style="color: #009900;color: #000080;">&#125;</span>
                          <span style="color: #009900;color: #000080;">&#125;</span>
                       <span style="color: #009900;color: #000080;">&#125;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #000066; font-weight: bold;color: #000080;">this</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                   <span style="color: #009900;color: #000080;">&#125;</span>
               <span style="color: #003366; font-weight: bold;color: #000080;">var</span> fontis_trans <span style="color: #339933;color: #000080;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'template_text___Frame'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
               <span style="color: #000066; font-weight: bold;color: #000080;">if</span><span style="color: #009900;color: #000080;">&#40;</span>fontis_trans<span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>fontis_trans.<span style="color: #660066;">contentWindow</span>.<span style="color: #660066;">location</span>.<span style="color: #660066;">reload</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #003366; font-weight: bold;color: #000080;">true</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span><span style="color: #009900;color: #000080;">&#125;</span>
               <span style="color: #009900;color: #000080;">&#125;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #000066; font-weight: bold;color: #000080;">this</span><span style="color: #009900;color: #000080;">&#41;</span>
            <span style="color: #009900;color: #000080;">&#125;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span></pre></div></div><p>We just told the Fontis WYSIWYG editor to refresh itself in the Transactional Emails page whenever we select a new template.</p><p>Now, we return to Magento [System-&gt;Configuration-&gt;Admin]. You should now see Template Text / Transactional Emails as a selectable item. After selecting it, your screen should now look like the following:</p><p><img class="aligncenter size-full wp-image-197" title="fck-3" src="http://www.tlswebsolutions.com/wp-content/uploads/2009/08/fck-3.gif" alt="fck-3" width="532" height="473" /></p><p><strong>Note:</strong><em><strong> If you still have the &#8220;template_text&#8221; you input from the First Step, you can delete this by clicking the (x) icon next to its name. We no longer need this, we want to have your screen display exactly like the screen shot above.</strong></em></p><p>After selecting this, saving the page, and browsing to the Transactional Emails page and clicking on &#8216;New Template&#8217; to confirm that indeed the fix was applied&#8230; the New Email Template page should now appear like the screen shot below.</p><p><img class="aligncenter size-full wp-image-198" title="fck-4" src="http://www.tlswebsolutions.com/wp-content/uploads/2009/08/fck-4.gif" alt="fck-4" width="684" height="437" /></p><p>That&#8217;s it! You&#8217;re all set and ready to go.</p><hr /><strong><span style="font-size:20px; color:#ff0000;">EDIT: THE SOLUTION IS ABOVE THIS SECTION. DO NOT USE THE FOLLOWING CODE BELOW, ANY INFORMATION BELOW DOCUMENTS A FIX REGARDING THE LOADING OF CONTENT INTO THE WYSIWYG WITH AJAX. </span></strong></p><p>It has been confirmed that after applying the WYSIWYG to the Transactional Emails page, Magento will no longer load in any of the default mail template&#8217;s content. After anaylzing the code, I found some things that prove to be interesting.</p><p>On line 717 of the New Email Template page source code is the following</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #003d68;">load<span style="color: #339933;color: #000080;">:</span> <span style="color: #003366; font-weight: bold;color: #000080;">function</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
            <span style="color: #003366; font-weight: bold;color: #000080;">var</span> form <span style="color: #339933;color: #000080;">=</span> <span style="color: #003366; font-weight: bold;color: #000080;">new</span> varienForm<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span><span style="color: #339933;color: #000080;">!</span>form.<span style="color: #660066;">validator</span>.<span style="color: #660066;">validate</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                <span style="color: #000066; font-weight: bold;color: #000080;">return</span><span style="color: #339933;color: #000080;">;</span>
            <span style="color: #009900;color: #000080;">&#125;</span>
&nbsp;
            <span style="color: #003366; font-weight: bold;color: #000080;">new</span> Ajax.<span style="color: #660066;">Request</span><span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">action</span><span style="color: #339933;color: #000080;">,</span> <span style="color: #009900;color: #000080;">&#123;</span>
               parameters<span style="color: #339933;color: #000080;">:</span> Form.<span style="color: #660066;">serialize</span><span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span> <span style="color: #003366; font-weight: bold;color: #000080;">true</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
               area<span style="color: #339933;color: #000080;">:</span> $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'email_template_load_form'</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">,</span>
               onComplete<span style="color: #339933;color: #000080;">:</span> <span style="color: #003366; font-weight: bold;color: #000080;">function</span> <span style="color: #009900;color: #000080;">&#40;</span>transport<span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                   <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>transport.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">isJSON</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                       <span style="color: #003366; font-weight: bold;color: #000080;">var</span> fields <span style="color: #339933;color: #000080;">=</span> $H<span style="color: #009900;color: #000080;">&#40;</span>transport.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">evalJSON</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                       fields.<span style="color: #660066;">each</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #003366; font-weight: bold;color: #000080;">function</span><span style="color: #009900;color: #000080;">&#40;</span>pair<span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                          <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>$<span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                              $<span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">value</span> <span style="color: #339933;color: #000080;">=</span> pair.<span style="color: #660066;">value</span>.<span style="color: #660066;">strip</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                          <span style="color: #009900;color: #000080;">&#125;</span>
                          <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">key</span> <span style="color: #339933;color: #000080;">==</span> <span style="color: #3366CC;color: #000080;">'template_type'</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                              <span style="color: #000066; font-weight: bold;color: #000080;">if</span> <span style="color: #009900;color: #000080;">&#40;</span>pair.<span style="color: #660066;">value</span> <span style="color: #339933;color: #000080;">==</span> <span style="color: #CC0000;color: #000080;">1</span><span style="color: #009900;color: #000080;">&#41;</span> <span style="color: #009900;color: #000080;">&#123;</span>
                                  <span style="color: #000066; font-weight: bold;color: #000080;">this</span>.<span style="color: #660066;">typeChange</span> <span style="color: #339933;color: #000080;">=</span> <span style="color: #003366; font-weight: bold;color: #000080;">true</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button_back'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                              <span style="color: #009900;color: #000080;">&#125;</span> <span style="color: #000066; font-weight: bold;color: #000080;">else</span> <span style="color: #009900;color: #000080;">&#123;</span>
                                  <span style="color: #000066; font-weight: bold;color: #000080;">this</span>.<span style="color: #660066;">typeChange</span> <span style="color: #339933;color: #000080;">=</span> <span style="color: #003366; font-weight: bold;color: #000080;">false</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button_back'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                                  $<span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'convert_button'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                              <span style="color: #009900;color: #000080;">&#125;</span>
                          <span style="color: #009900;color: #000080;">&#125;</span>
                       <span style="color: #009900;color: #000080;">&#125;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #000066; font-weight: bold;color: #000080;">this</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
                   <span style="color: #009900;color: #000080;">&#125;</span>
               <span style="color: #009900;color: #000080;">&#125;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #000066; font-weight: bold;color: #000080;">this</span><span style="color: #009900;color: #000080;">&#41;</span>
            <span style="color: #009900;color: #000080;">&#125;</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span>
&nbsp;
        <span style="color: #009900;color: #000080;">&#125;</span></pre></div></div><p>When Magento loads in a new email template, it calls this exact function. Generally, it will find the textarea (template_text). However, Fontis likes to remove this textarea with something that tends to be the bane of most developers, frames.</p><p>Take a look at the code before Fontis:</p><div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;color: #003d68;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;color: #000080;">textarea</span> <span style="color: #000066;color: #FF0000;">id</span><span style="color: #66cc66;color: #000080;">=</span><span style="color: #ff0000;color: #000080;">&quot;template_text&quot;</span> <span style="color: #000066;color: #FF0000;">class</span><span style="color: #66cc66;color: #000080;">=</span><span style="color: #ff0000;color: #000080;">&quot;textarea  required-entry&quot;</span> <span style="color: #000066;color: #FF0000;">style</span><span style="color: #66cc66;color: #000080;">=</span><span style="color: #ff0000;color: #000080;">&quot;height: 24em;&quot;</span> <span style="color: #000066;color: #FF0000;">cols</span><span style="color: #66cc66;color: #000080;">=</span><span style="color: #ff0000;color: #000080;">&quot;15&quot;</span> <span style="color: #000066;color: #FF0000;">rows</span><span style="color: #66cc66;color: #000080;">=</span><span style="color: #ff0000;color: #000080;">&quot;2&quot;</span> <span style="color: #000066;color: #FF0000;">name</span><span style="color: #66cc66;color: #000080;">=</span><span style="color: #ff0000;color: #000080;">&quot;template_text&quot;</span>&gt;&lt;<span style="color: #66cc66;color: #000080;">/</span><span style="color: #000000; font-weight: bold;color: #000080;">textarea</span>&gt;</span></pre></div></div><p>And now after Fontis:</p><p>As you can see, it&#8217;s changing the ID of &#8216;template_text&#8217; from the main editor by adding &#8216;___Frame&#8217; to it. Additionally, there is security issues and a lot of problems when having JavaScript write to another frame.  In short, looks like there has to be some JavaScript added specifically for loading in templates. I am attempting my hand at it, I&#8217;ll post back.</p><hr />After checking back, it seems as if the textarea is first filled with saved content and then processed into the frame. Once the WYSIWYG has all of the data from the textarea&#8217;s value, it hides the text area and displays the FCKEditor with the content it copied.  The problem seems to rely in being able to reload the wysiwyg with new content from the textarea when selecting a new template to load. However, since the textarea is not being updated, neither is the editor. Additionally, I don&#8217;t think the capability or functionality was built in to have the editor update itself during the AJAX request. More to come later.</p><hr />Beautiful, I figured it out. After having seen Rob&#8217;s comment I set out to find an answer, I wanted to share the solution with everyone. After loading in a template as usual, the wysiwyg did not grab the content from the template. I typed this into the URL bar</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #003d68;">javascript<span style="color: #339933;color: #000080;">:</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #3366CC;color: #000080;">'template_text___Frame'</span><span style="color: #009900;color: #000080;">&#41;</span>.<span style="color: #660066;">contentWindow</span>.<span style="color: #660066;">location</span>.<span style="color: #660066;">reload</span><span style="color: #009900;color: #000080;">&#40;</span><span style="color: #003366; font-weight: bold;color: #000080;">true</span><span style="color: #009900;color: #000080;">&#41;</span><span style="color: #339933;color: #000080;">;</span></pre></div></div><p>And BEHOLD, it reloads the frame as WELL as the new content it SHOULD be loading in. I&#8217;m writing a custom solution for this fix and will be adding it in the solution section of this post.</p><hr />The additional fix has been added to update the WYSIWYG on the transactional emails new template page whenever a new template is loaded in.</p> ]]></content:encoded> <wfw:commentRss>http://www.tlswebsolutions.com/magento-fontis-fckeditor-wysiwyg-transactional-email/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic

Served from: www.tlswebsolutions.com @ 2012-02-06 03:10:50 -->
