<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;p&gt;I&amp;#8217;ve enabled the &lt;span class=&quot;caps&quot;&gt;YUI&lt;/span&gt; Rich Text Editor for content editing.&lt;/p&gt;
&lt;p&gt;Code has been added to the application helper with the methods to be called in any view.&lt;/p&gt;
&lt;p&gt;The three helpers are&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;yui_headers&lt;/li&gt;
	&lt;li&gt;yui_headers_debug&lt;/li&gt;
	&lt;li&gt;yui_headers_raw&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These return the respective javascript headers for &lt;span class=&quot;caps&quot;&gt;YUI&lt;/span&gt; (according to debug level) .  This function returns the headers to :head&lt;/p&gt;
&amp;lt;%= yield :head %&amp;gt;
&lt;p&gt;in the application layout handles this return.&lt;/p&gt;
&lt;p&gt;At the end of all of the yui_headers,  the helper yui_rte is called.&lt;/p&gt;
&lt;p&gt;This executes the script that renders the rich text editor.&lt;/p&gt;
&lt;p&gt;yui_rte might need to be changed if more than one configuration of the rte is needed.&lt;/p&gt;
&lt;p&gt;Any view that needs the rich text editor needs the following line at the top&lt;br /&gt;
&amp;lt;%= yui_headers(&amp;#8216;text_area&amp;#8217;)  %&amp;gt;&lt;/p&gt;
&lt;p&gt;text_area is the #id of the text area the rte should be rendered in&lt;/p&gt;
&lt;p&gt;In the controller for that  view, you need to add :&lt;br /&gt;
    @body = &amp;#8220;yui-skin-sam&amp;#8221;&lt;br /&gt;
This adds a class for the body that tells the &lt;span class=&quot;caps&quot;&gt;YUI&lt;/span&gt; to bring it on.&lt;/p&gt;</body>
  <created-at type="datetime">2009-11-24T03:49:53-08:00</created-at>
  <id type="integer">80114</id>
  <permalink>yui</permalink>
  <repository-id type="integer">52116</repository-id>
  <title>YUI</title>
  <updated-at type="datetime">2008-11-12T17:58:55-08:00</updated-at>
  <user-id type="integer">17569</user-id>
</wiki>
