<?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>Flex Examples &#187; RichTextEditor</title>
	<atom:link href="http://blog.flexexamples.com/category/halo/richtexteditor/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Removing controls from the MX RichTextEditor control in Flex</title>
		<link>http://blog.flexexamples.com/2010/02/17/removing-controls-from-the-mx-richtexteditor-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2010/02/17/removing-controls-from-the-mx-richtexteditor-control-in-flex/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 00:31:20 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[linkTextInput]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2491</guid>
		<description><![CDATA[<p>The following example shows how you can remove controls from the MX RichTextEditor control by removing the controls from the display list and resizing the linkTextInput TextInput control.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/02/17/removing-controls-from-the-mx-richtexteditor-control-in-flex/ --&#62; &#60;mx:Application name=&#34;RichTextEditor_linkTextInput_test&#34; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; xmlns:comps=&#34;comps.*&#34; layout=&#34;vertical&#34; verticalAlign=&#34;middle&#34; backgroundColor=&#34;white&#34;&#62; &#160; &#60;comps:LinkOnlyRichTextEditor /&#62; &#160; &#60;/mx:Application&#62; <p>And the custom RichTextEditor control, comps/LinkOnlyRichTextEditor.mxml, is as [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can remove controls from the MX RichTextEditor control by removing the controls from the display list and resizing the <code>linkTextInput</code> TextInput control.</p>
<p><span id="more-2491"></span></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/17/removing-controls-from-the-mx-richtexteditor-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;RichTextEditor_linkTextInput_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        xmlns:comps=<span style="color: #ff0000;">&quot;comps.*&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;comps:LinkOnlyRichTextEditor</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And the custom RichTextEditor control, <em>comps/LinkOnlyRichTextEditor.mxml</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/17/removing-controls-from-the-mx-richtexteditor-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:RichTextEditor</span> name=<span style="color: #ff0000;">&quot;LinkOnlyRichTextEditor&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        creationComplete=<span style="color: #ff0000;">&quot;init();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            private function init():void {</span>
<span style="color: #339933;">                // remove unwanted controls...</span>
<span style="color: #339933;">                fontFamilyCombo.parent.removeChild(fontFamilyCombo);</span>
<span style="color: #339933;">                fontSizeCombo.parent.removeChild(fontSizeCombo);</span>
<span style="color: #339933;">                toolBar2.parent.removeChild(toolBar2);</span>
<span style="color: #339933;">                colorPicker.parent.removeChild(colorPicker);</span>
<span style="color: #339933;">                alignButtons.parent.removeChild(alignButtons);</span>
<span style="color: #339933;">                bulletButton.parent.removeChild(bulletButton);</span>
&nbsp;
<span style="color: #339933;">                // remove vertical separators...</span>
<span style="color: #339933;">                _RichTextEditor_VRule1.parent.removeChild(_RichTextEditor_VRule1);</span>
<span style="color: #339933;">                _RichTextEditor_VRule2.parent.removeChild(_RichTextEditor_VRule2);</span>
&nbsp;
<span style="color: #339933;">                // resize link TextInput control...</span>
<span style="color: #339933;">                linkTextInput.width = toolbar.width;</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:RichTextEditor</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Removing controls from the MX RichTextEditor control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/02/17/removing-controls-from-the-mx-richtexteditor-control-in-flex/',contentID: 'post-2491',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'linkTextInput',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/02/17/removing-controls-from-the-mx-richtexteditor-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting the background alpha of the RichTextEditor text area in Flex</title>
		<link>http://blog.flexexamples.com/2008/08/25/setting-the-background-alpha-of-the-richtexteditor-text-area-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/08/25/setting-the-background-alpha-of-the-richtexteditor-text-area-in-flex/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 07:55:30 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[TextArea]]></category>
		<category><![CDATA[backgroundAlpha]]></category>
		<category><![CDATA[textAreaStyleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/25/setting-the-background-alpha-of-the-richtexteditor-text-area-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/">Setting the background color of the RichTextEditor text area in Flex</a>, we saw how you could set the background color of the RichTextEditor control&#8217;s nested TextArea control by setting the backgroundColor style.</p> <p>The following example shows how you can set the background alpha of the Flex RichTextEditor control&#8217;s nested TextArea [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/">Setting the background color of the RichTextEditor text area in Flex</a>, we saw how you could set the background color of the RichTextEditor control&#8217;s nested TextArea control by setting the <code>backgroundColor</code> style.</p>
<p>The following example shows how you can set the background alpha of the Flex RichTextEditor control&#8217;s nested TextArea control by setting the <code>backgroundAlpha</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-764"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textArea_backgroundAlpha_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/25/setting-the-background-alpha-of-the-richtexteditor-text-area-in-flex/ --&gt;
&lt;mx:Application name="RichTextEditor_textArea_backgroundAlpha_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ColorPickerEvent;
            import mx.events.SliderEvent;

            private function colorPicker_change(evt:ColorPickerEvent):void {
                richTextEditor.textArea.setStyle("backgroundColor", evt.color);
            }

            private function slider_change(evt:SliderEvent):void {
                richTextEditor.textArea.setStyle("backgroundAlpha", evt.value);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="backgroundColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker"
                        selectedColor="0xFFFFFF"
                        change="colorPicker_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="backgroundAlpha:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0.0"
                        maximum="1.0"
                        value="1.0"
                        snapInterval="0.01"
                        tickInterval="0.1"
                        liveDragging="true"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:RichTextEditor id="richTextEditor" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textArea_backgroundAlpha_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textArea_backgroundAlpha_test/bin/main.html" width="100%" height="420"></iframe></p>
<p>You can also set the nested TextArea control&#8217;s background alpha in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textArea_backgroundAlpha_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/25/setting-the-background-alpha-of-the-richtexteditor-text-area-in-flex/ --&gt;
&lt;mx:Application name="RichTextEditor_textArea_backgroundAlpha_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        RichTextEditor {
            textAreaStyleName: rteTextAreaStyles;
        }

        .rteTextAreaStyles {
            backgroundAlpha: 0.3; /* 30% */
            backgroundColor: red;
        }
    &lt;/mx:Style&gt;

    &lt;mx:RichTextEditor id="richTextEditor" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the background alpha of the RichTextEditor text area in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/25/setting-the-background-alpha-of-the-richtexteditor-text-area-in-flex/',contentID: 'post-764',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'backgroundAlpha,textAreaStyleName',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/25/setting-the-background-alpha-of-the-richtexteditor-text-area-in-flex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setting the background color of the RichTextEditor text area in Flex</title>
		<link>http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 07:01:18 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[TextArea]]></category>
		<category><![CDATA[backgroundColor]]></category>
		<category><![CDATA[textAreaStyleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the background color of the Flex RichTextEditor control&#8217;s nested TextArea control by setting the backgroundColor style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_backgroundColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/ --&#62; &#60;mx:Application name="RichTextEditor_backgroundColor_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ import mx.events.ColorPickerEvent; private function colorPicker_change(evt:ColorPickerEvent):void { richTextEditor.textArea.setStyle("backgroundColor", [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the background color of the Flex RichTextEditor control&#8217;s nested TextArea control by setting the <code>backgroundColor</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-763"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_backgroundColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/ --&gt;
&lt;mx:Application name="RichTextEditor_backgroundColor_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ColorPickerEvent;

            private function colorPicker_change(evt:ColorPickerEvent):void {
                richTextEditor.textArea.setStyle("backgroundColor", evt.color);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="backgroundColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker"
                        selectedColor="0xFFFFFF"
                        change="colorPicker_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:RichTextEditor id="richTextEditor" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_backgroundColor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_backgroundColor_test/bin/main.html" width="100%" height="400"></iframe></p>
<p>You can also set the nested TextArea control&#8217;s background color in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_backgroundColor_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/ --&gt;
&lt;mx:Application name="RichTextEditor_backgroundColor_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        RichTextEditor {
            textAreaStyleName: rteTextAreaStyles;
        }

        .rteTextAreaStyles {
            backgroundColor: haloSilver;
        }
    &lt;/mx:Style&gt;

    &lt;mx:RichTextEditor id="richTextEditor" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the background color of the RichTextEditor text area in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/',contentID: 'post-763',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'backgroundColor,textAreaStyleName',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Condensing HTML white space in the RichTextEditor control in Flex</title>
		<link>http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-richtexteditor-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-richtexteditor-control-in-flex/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 02:25:53 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[TextArea]]></category>
		<category><![CDATA[condenseWhite]]></category>
		<category><![CDATA[htmlText]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-richtexteditor-control-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-textarea-control-in-flex/">&#8220;Condensing HTML white space in the TextArea control in Flex&#8221;</a>, we looked at how you could condense HTML formatted text in a TextArea control by setting the condenseWhite property.</p> <p>The following example shows you how you can condense white space around HTML tags using the Flex RichTextEditor control, the htmlText [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-textarea-control-in-flex/">&#8220;Condensing HTML white space in the TextArea control in Flex&#8221;</a>, we looked at how you could condense HTML formatted text in a TextArea control by setting the <code>condenseWhite</code> property.</p>
<p>The following example shows you how you can condense white space around HTML tags using the Flex RichTextEditor control, the <code>htmlText</code> property, and the <code>condenseWhite</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-607"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textArea_condenseWhite_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-richtexteditor-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function checkBox_change(evt:Event):void {
                richTextEditor.textArea.condenseWhite = checkBox.selected;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:String id="str" source="lorem.html" /&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="condenseWhite:"&gt;
                &lt;mx:CheckBox id="checkBox"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:RichTextEditor id="richTextEditor"
            htmlText="{str}"
            width="100%"
            height="100%" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textArea_condenseWhite_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textArea_condenseWhite_test/bin/main.html" width="100%" height="400"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Condensing HTML white space in the RichTextEditor control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-richtexteditor-control-in-flex/',contentID: 'post-607',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'condenseWhite,htmlText',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/04/24/condensing-html-white-space-in-the-richtexteditor-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Setting the letter spacing in the RichTextEditor control in Flex</title>
		<link>http://blog.flexexamples.com/2008/04/22/setting-the-letter-spacing-in-the-richtexteditor-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/04/22/setting-the-letter-spacing-in-the-richtexteditor-control-in-flex/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 03:55:27 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[CSSStyleDeclaration]]></category>
		<category><![CDATA[getStyleDeclaration()]]></category>
		<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[StyleManager]]></category>
		<category><![CDATA[TextArea]]></category>
		<category><![CDATA[letterSpacing]]></category>
		<category><![CDATA[textAreaStyleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/04/22/setting-the-letter-spacing-in-the-richtexteditor-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the letter spacing in a Flex RichTextEditor control by setting the textAreaStyleName and letterSpacing styles.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textAreaStyleName_letterSpacing_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/04/22/setting-the-letter-spacing-in-the-richtexteditor-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; .myTextAreaStyleName { fontFamily: Courier; letterSpacing: 3; /* pixels */ } [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the letter spacing in a Flex RichTextEditor control by setting the <code>textAreaStyleName</code> and <code>letterSpacing</code> styles.</p>
<p>Full code after the jump.</p>
<p><span id="more-604"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textAreaStyleName_letterSpacing_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/04/22/setting-the-letter-spacing-in-the-richtexteditor-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        .myTextAreaStyleName {
            fontFamily: Courier;
            letterSpacing: 3; /* pixels */
        }
    &lt;/mx:Style&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private function slider_change(evt:SliderEvent):void {
                var cssStyle:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".myTextAreaStyleName");
                cssStyle.setStyle("letterSpacing", evt.value);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:String id="str" source="lorem.txt" /&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="letterSpacing:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0"
                        maximum="20"
                        value="3"
                        liveDragging="true"
                        snapInterval="1"
                        tickInterval="1"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:RichTextEditor id="richTextEditor"
            text="{str}"
            textAreaStyleName="myTextAreaStyleName"
            width="100%"
            height="100%" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textAreaStyleName_letterSpacing_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_textAreaStyleName_letterSpacing_test/bin/main.html" width="100%" height="450"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the letter spacing in the RichTextEditor control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/04/22/setting-the-letter-spacing-in-the-richtexteditor-control-in-flex/',contentID: 'post-604',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'getStyleDeclaration(),letterSpacing,textAreaStyleName',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/04/22/setting-the-letter-spacing-in-the-richtexteditor-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Creating a custom context menu on a RichTextEditor control in Flex</title>
		<link>http://blog.flexexamples.com/2007/12/31/creating-a-custom-context-menu-on-a-richtexteditor-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2007/12/31/creating-a-custom-context-menu-on-a-richtexteditor-control-in-flex/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 06:03:35 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[ContextMenu]]></category>
		<category><![CDATA[ContextMenuEvent]]></category>
		<category><![CDATA[ContextMenuItem]]></category>
		<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[hideBuiltInItems()]]></category>
		<category><![CDATA[menuItemSelect]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/31/creating-a-custom-context-menu-on-a-richtexteditor-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can add custom context menu commands to a RichTextEditor control in Flex by setting the contextMenu property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_contextMenu_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/12/31/creating-a-custom-context-menu-on-a-richtexteditor-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" creationComplete="init();"&#62; &#60;mx:Script&#62; &#60;![CDATA[ import mx.controls.Alert; [Bindable] private var cm:ContextMenu; private function [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can add custom context menu commands to a RichTextEditor control in Flex by setting the <code>contextMenu</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-404"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_contextMenu_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/12/31/creating-a-custom-context-menu-on-a-richtexteditor-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        creationComplete="init();"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Alert;

            [Bindable]
            private var cm:ContextMenu;

            private function init():void {
                var showSelection:ContextMenuItem = new ContextMenuItem("Show selection");
                showSelection.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, showSelection_menuItemSelect);

                var upperCase:ContextMenuItem = new ContextMenuItem("Convert to upper case");
                upperCase.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, upperCase_menuItemSelect);

                var lowerCase:ContextMenuItem = new ContextMenuItem("Convert to lower case");
                lowerCase.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, lowerCase_menuItemSelect);

                cm = new ContextMenu();
                cm.hideBuiltInItems();
                cm.customItems.push(showSelection);
                cm.customItems.push(upperCase);
                cm.customItems.push(lowerCase);

                richTextEditor.contextMenu = cm;
            }

            private function showSelection_menuItemSelect(evt:ContextMenuEvent):void {
                var selText:String = richTextEditor.selection.text;
                if (selText.length == 0) {
                    Alert.show("Please select some text.", "** ERROR **");
                } else {
                    Alert.show(selText, selText.length + " character(s)");
                }
            }

            private function upperCase_menuItemSelect(evt:ContextMenuEvent):void {
                var selText:String = richTextEditor.selection.text;
                richTextEditor.selection.text = selText.toUpperCase();
            }

            private function lowerCase_menuItemSelect(evt:ContextMenuEvent):void {
                var selText:String = richTextEditor.selection.text;
                richTextEditor.selection.text = selText.toLowerCase();
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:RichTextEditor id="richTextEditor"
            title="Rich Text Editor"
            status="status message"
            width="100%"
            height="100%"&gt;
        &lt;mx:text&gt;&lt;![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec lacus est, ullamcorper sit amet, gravida at, viverra sit amet, lacus. Aliquam quis lectus id nisl condimentum hendrerit. Maecenas metus libero, dictum et, scelerisque vel, hendrerit non, felis. Duis venenatis, ligula eu lobortis lobortis, turpis erat eleifend eros, vitae auctor tortor mi in urna. Etiam aliquam, tellus aliquet placerat malesuada, orci sem rhoncus lectus, a elementum neque odio vitae urna. Pellentesque eget felis. Aenean at nisi. Proin felis. Curabitur scelerisque risus eget purus. Sed commodo eros in dolor. Sed quis lectus. Integer iaculis leo quis enim. Maecenas orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean et massa sit amet nibh fermentum accumsan. Maecenas aliquam metus dapibus mi. Pellentesque egestas posuere leo. Maecenas pellentesque diam non augue. Nulla vel nisi sit amet eros suscipit sagittis.]]&gt;&lt;/mx:text&gt;
    &lt;/mx:RichTextEditor&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_contextMenu_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_contextMenu_test/bin/main.html" width="100%" height="400"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a custom context menu on a RichTextEditor control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/12/31/creating-a-custom-context-menu-on-a-richtexteditor-control-in-flex/',contentID: 'post-404',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'hideBuiltInItems(),menuItemSelect',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/12/31/creating-a-custom-context-menu-on-a-richtexteditor-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the RichTextEditor control&#8217;s style name in Flex</title>
		<link>http://blog.flexexamples.com/2007/12/31/changing-the-richtexteditor-controls-style-name-in-flex/</link>
		<comments>http://blog.flexexamples.com/2007/12/31/changing-the-richtexteditor-controls-style-name-in-flex/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 02:31:35 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[opaquePanel]]></category>
		<category><![CDATA[styleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/31/changing-the-richtexteditor-controls-style-name-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can change the style name for the Flex RichTextEditor control to the predefined &#8220;.opaquePanel&#8221; style, by setting the styleName property on the RichTextEditor.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_styleName_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/12/31/changing-the-richtexteditor-controls-style-name-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:ToggleButtonBar selectedIndex="1" itemClick="richTextEditor.styleName [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the style name for the Flex RichTextEditor control to the predefined &#8220;.opaquePanel&#8221; style, by setting the <code>styleName</code> property on the RichTextEditor.</p>
<p>Full code after the jump.</p>
<p><span id="more-401"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_styleName_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/12/31/changing-the-richtexteditor-controls-style-name-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:ToggleButtonBar selectedIndex="1"
                itemClick="richTextEditor.styleName = event.item.data;"&gt;
            &lt;mx:dataProvider&gt;
                &lt;mx:Array&gt;
                    &lt;mx:Object label="default" data="" /&gt;
                    &lt;mx:Object label="opaquePanel" data="opaquePanel" /&gt;
                &lt;/mx:Array&gt;
            &lt;/mx:dataProvider&gt;
        &lt;/mx:ToggleButtonBar&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:RichTextEditor id="richTextEditor"
            title="RichTextEditor"
            status="version {richTextEditor.getStyle('version')}"
            styleName="opaquePanel"
            width="100%"
            height="100%" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_styleName_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_styleName_test/bin/main.html" width="100%" height="350"></iframe></p>
<p class="construction">As of the December 4, 2007 build, the defaults.css file (in the installed SDK folder&#8217;s \frameworks\projects\framework\ folder) lists the &#8220;.opaquePanel&#8221; style as:</p>
<pre class="code">
.opaquePanel
{
	backgroundColor: #FFFFFF;
	borderAlpha: 1;
	borderColor: #FFFFFF;
	footerColors: #E7E7E7, #C7C7C7;
	headerColors: #E7E7E7, #D9D9D9;
}
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the RichTextEditor control\&#039;s style name in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/12/31/changing-the-richtexteditor-controls-style-name-in-flex/',contentID: 'post-401',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'opaquePanel,styleName',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/12/31/changing-the-richtexteditor-controls-style-name-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Toggling the control bar in a Flex RichTextEditor control (redux)</title>
		<link>http://blog.flexexamples.com/2007/12/31/toggling-the-control-bar-in-a-flex-richtexteditor-control-redux/</link>
		<comments>http://blog.flexexamples.com/2007/12/31/toggling-the-control-bar-in-a-flex-richtexteditor-control-redux/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 01:56:36 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[rollOut]]></category>
		<category><![CDATA[rollOver]]></category>
		<category><![CDATA[showControlBar]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/31/toggling-the-control-bar-in-a-flex-richtexteditor-control-redux/</guid>
		<description><![CDATA[<p>It seems that I&#8217;ve covered this before, <a href="http://blog.flexexamples.com/2007/11/21/toggling-the-control-bar-in-a-flex-richtexteditor-control/">&#8220;Toggling the control bar in a Flex RichTextEditor control&#8221;</a>, but here is another useful way to toggle the control bar in a Flex RichTextEditor control. The following example shows how you can toggle the RichTextEditor control&#8217;s control bar by moving the mouse cursor over or out of [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that I&#8217;ve covered this before, <a href="http://blog.flexexamples.com/2007/11/21/toggling-the-control-bar-in-a-flex-richtexteditor-control/">&#8220;Toggling the control bar in a Flex RichTextEditor control&#8221;</a>, but here is another useful way to toggle the control bar in a Flex RichTextEditor control. The following example shows how you can toggle the RichTextEditor control&#8217;s control bar by moving the mouse cursor over or out of the RichTextEditor instance.</p>
<p>Full code after the jump.</p>
<p><span id="more-400"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_showControlBar_test_2/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/12/31/toggling-the-control-bar-in-a-flex-richtexteditor-control-redux/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:RichTextEditor id="richTextEditor"
            title="RichTextEditor"
            status="version {richTextEditor.getStyle('version')}"
            showControlBar="false"
            cornerRadius="0"
            width="100%"
            height="100%"
            rollOut="richTextEditor.showControlBar = false;"
            rollOver="richTextEditor.showControlBar = true;" /&gt;

    &lt;mx:Label text="Roll over the RichTextEditor control above to toggle the control bar." /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_showControlBar_test_2/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_showControlBar_test_2/bin/main.html" width="100%" height="400"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Toggling the control bar in a Flex RichTextEditor control (redux) on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/12/31/toggling-the-control-bar-in-a-flex-richtexteditor-control-redux/',contentID: 'post-400',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'rollOut,rollOver,showControlBar',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/12/31/toggling-the-control-bar-in-a-flex-richtexteditor-control-redux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hiding nested controls in a Flex RichTextEditor control (remix)</title>
		<link>http://blog.flexexamples.com/2007/12/04/hiding-nested-controls-in-a-flex-richtexteditor-control-remix/</link>
		<comments>http://blog.flexexamples.com/2007/12/04/hiding-nested-controls-in-a-flex-richtexteditor-control-remix/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 06:44:51 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[alignButtons]]></category>
		<category><![CDATA[bulletButton]]></category>
		<category><![CDATA[fontFamilyCombo]]></category>
		<category><![CDATA[fontSizeCombo]]></category>
		<category><![CDATA[linkTextInput]]></category>
		<category><![CDATA[toolBar2]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/04/hiding-nested-controls-in-a-flex-richtexteditor-control-remix/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/">Hiding nested controls in a Flex RichTextEditor control</a>, we looked at how you could hide and remove the nested link text input control within a RichTextEditor control in Flex. The following example extends the example somewhat by allowing you to remove any of the nested controls (including the VRule controls) [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/">Hiding nested controls in a Flex RichTextEditor control</a>, we looked at how you could hide and remove the nested link text input control within a RichTextEditor control in Flex. The following example extends the example somewhat by allowing you to remove any of the nested controls (including the VRule controls) in in the tool bar by setting the nested control&#8217;s <code>visible</code> property to <code>false</code>, as seen in the following snippet:</p>
<pre class="code">
richTextEditor.colorPicker.visible = false;
</pre>
<p><span id="more-350"></span></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2007/12/04/hiding-nested-controls-in-a-flex-richtexteditor-control-remix/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.controls.CheckBox;</span>
&nbsp;
<span style="color: #339933;">            private function checkBox_change(evt:Event):void {</span>
<span style="color: #339933;">                var ch:CheckBox = evt.currentTarget as CheckBox;</span>
<span style="color: #339933;">                richTextEditor[ch.data].visible = ch.selected;</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;top&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;fontFamilyCombo.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;fontFamilyCombo&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;fontSizeCombo.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;fontSizeCombo&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;toolBar2.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;toolBar2&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;colorPicker.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;colorPicker&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;alignButtons.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;alignButtons&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;bulletButton.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;bulletButton&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;linkTextInput.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;linkTextInput&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Spacer</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;_RichTextEditor_VRule1.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;_RichTextEditor_VRule1&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;_RichTextEditor_VRule2.visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        data=<span style="color: #ff0000;">&quot;_RichTextEditor_VRule2&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:RichTextEditor</span> id=<span style="color: #ff0000;">&quot;richTextEditor&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;100%&quot;</span></span>
<span style="color: #000000;">            height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_fontFamilyCombo_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_fontFamilyCombo_test/bin/main.html" width="100%" height="500"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Hiding nested controls in a Flex RichTextEditor control (remix) on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/12/04/hiding-nested-controls-in-a-flex-richtexteditor-control-remix/',contentID: 'post-350',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'alignButtons,bulletButton,fontFamilyCombo,fontSizeCombo,linkTextInput,toolBar2',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/12/04/hiding-nested-controls-in-a-flex-richtexteditor-control-remix/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Hiding nested controls in a Flex RichTextEditor control</title>
		<link>http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/</link>
		<comments>http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 07:01:31 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[includeInLayout]]></category>
		<category><![CDATA[linkTextInput]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/</guid>
		<description><![CDATA[<p>The following example shows you how you can toggle the RichTextEditor control&#8217;s nested link text input by setting both the visible and includeInLayout properties of the control.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_linkTextInput_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ import mx.controls.TextInput; private function toggle_linkTextInput():void [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you can toggle the RichTextEditor control&#8217;s nested link text input by setting both the <code>visible</code> and <code>includeInLayout</code> properties of the control.</p>
<p>Full code after the jump.</p>
<p><span id="more-328"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_linkTextInput_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.TextInput;

            private function toggle_linkTextInput():void {
                var textInput:TextInput = richTextEditor.linkTextInput;
                var isSelected:Boolean = checkBox.selected;
                textInput.visible = isSelected;
                textInput.includeInLayout = isSelected;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:CheckBox id="checkBox"
                label="RichTextEditor linkTextInput visible:"
                labelPlacement="left"
                selected="true"
                change="toggle_linkTextInput();" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:RichTextEditor id="richTextEditor" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_linkTextInput_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_linkTextInput_test/bin/main.html" width="100%" height="400"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Hiding nested controls in a Flex RichTextEditor control on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/',contentID: 'post-328',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'includeInLayout,linkTextInput,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

