<?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 the world &#187; 富文本编辑器</title>
	<atom:link href="http://www.flextheworld.com/tag/%e5%af%8c%e6%96%87%e6%9c%ac%e7%bc%96%e8%be%91%e5%99%a8/feed" rel="self" type="application/rss+xml" />
	<link>http://www.flextheworld.com</link>
	<description>Flex, AIR, FMS, P2P and Things......</description>
	<lastBuildDate>Fri, 10 Sep 2010 08:08:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flex仿Word弹出式富文本编辑器</title>
		<link>http://www.flextheworld.com/2009/07/flex-richtexttoolbar.html</link>
		<comments>http://www.flextheworld.com/2009/07/flex-richtexttoolbar.html#comments</comments>
		<pubDate>Mon, 06 Jul 2009 13:52:39 +0000</pubDate>
		<dc:creator>Kevin Luo</dc:creator>
				<category><![CDATA[开源控件]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[RichText Toolbar]]></category>
		<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[富文本编辑器]]></category>

		<guid isPermaLink="false">http://www.flextheworld.com/?p=546</guid>
		<description><![CDATA[项目中我们有时会用到RichTextEditor来进行富文本编辑，但Flex的RichTextEditor有一个明显的缺点就是体积太大，使用起来很不方便。大家也许使用过微软Office的弹出式富文本编辑器，用户随意点击文本的任何一个位置会弹出一个文本编辑条，用户可以设置字体，颜色等等。今天贡献给大家的就是这么一个控件。可以在任意的TextArea中使用，使用方法非常简单。我们先来看看下面的Demo
请点击文本框

API：
控件共三个public的静态方法，用于绑定控件以及移除控件。
PopupRichTextToolBarManager.addTarget(textArea:TextArea) &#8211;将控制条绑定到目标控件
PopupRichTextToolBarManager。removeTarget(textArea:TextArea) &#8212; 移除绑定
例子

?View Code XML&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;absolute&#34; creationComplete=&#34;init()&#34;&#62;
&#60;mx:Script&#62;
	&#60;![CDATA[
		import richtexttoolbar.PopupRichTextToolBarManager;
		private function init():void{
			PopupRichTextToolBarManager.addTarget(textArea);
			PopupRichTextToolBarManager.
		}
	]]&#62;
&#60;/mx:Script&#62;
    &#60;mx:Label text=&#34;弹出式富文本编辑器Demo&#34; horizontalCenter=&#34;0&#34; top=&#34;10&#34; fontSize=&#34;14&#34; fontWeight=&#34;bold&#34; /&#62;
	&#60;mx:TextArea horizontalCenter=&#34;0&#34; top=&#34;40&#34; width=&#34;300&#34; height=&#34;100&#34; id=&#34;textArea&#34; /&#62;
&#60;/mx:Application&#62;

代码结构
控件由两个部分组成，PopupRichTextToolBar与PopupRichTextToolBarManager，PopupRichTextToolBar是控制条的主体部分，从Flex的RichTextEditor中剥离，PopupRichTextToolBarManager是控制器，用于绑定控件等操作。感兴趣的朋友可以更具需要对其修改
源代码


]]></description>
			<content:encoded><![CDATA[<p>项目中我们有时会用到RichTextEditor来进行富文本编辑，但Flex的RichTextEditor有一个明显的缺点就是体积太大，使用起来很不方便。大家也许使用过微软Office的弹出式富文本编辑器，用户随意点击文本的任何一个位置会弹出一个文本编辑条，用户可以设置字体，颜色等等。今天贡献给大家的就是这么一个控件。可以在任意的TextArea中使用，使用方法非常简单。我们先来看看下面的Demo<span id="more-546"></span></p>
<p>请点击文本框</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.flextheworld.com/uploads/RichTextToolBarDemo.swf" /><embed type="application/x-shockwave-flash" width="500" height="300" src="http://www.flextheworld.com/uploads/RichTextToolBarDemo.swf"></embed></object></p>
<h3>API：</h3>
<p>控件共三个public的静态方法，用于绑定控件以及移除控件。<br />
PopupRichTextToolBarManager.addTarget(textArea:TextArea) &#8211;将控制条绑定到目标控件<br />
PopupRichTextToolBarManager。removeTarget(textArea:TextArea) &#8212; 移除绑定</p>
<h3>例子</h3>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p546code2'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5462"><td class="code" id="p546code2"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Application</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">&quot;absolute&quot;</span> <span style="color: #000066;">creationComplete</span>=<span style="color: #ff0000;">&quot;init()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #339933;">&lt;![CDATA[</span>
<span style="color: #339933;">		import richtexttoolbar.PopupRichTextToolBarManager;</span>
<span style="color: #339933;">		private function init():void{</span>
<span style="color: #339933;">			PopupRichTextToolBarManager.addTarget(textArea);</span>
<span style="color: #339933;">			PopupRichTextToolBarManager.</span>
<span style="color: #339933;">		}</span>
<span style="color: #339933;">	]]&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Label</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;弹出式富文本编辑器Demo&quot;</span> <span style="color: #000066;">horizontalCenter</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">fontSize</span>=<span style="color: #ff0000;">&quot;14&quot;</span> <span style="color: #000066;">fontWeight</span>=<span style="color: #ff0000;">&quot;bold&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:TextArea</span> <span style="color: #000066;">horizontalCenter</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;40&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;300&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;100&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;textArea&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<h3>代码结构</h3>
<p>控件由两个部分组成，PopupRichTextToolBar与PopupRichTextToolBarManager，PopupRichTextToolBar是控制条的主体部分，从Flex的RichTextEditor中剥离，PopupRichTextToolBarManager是控制器，用于绑定控件等操作。感兴趣的朋友可以更具需要对其修改</p>
<h3>源代码</h3>
<p><!--easy2hide start--><br />
<a class="downloadlink" href="http://www.flextheworld.com/wp-content/plugins/download-monitor/download.php?id=15" title=" downloaded 605 times" >RichTextEditor ToolBar (605)</a><br />
<!--easy2hide end--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flextheworld.com/2009/07/flex-richtexttoolbar.html/feed</wfw:commentRss>
		<slash:comments>209</slash:comments>
		</item>
	</channel>
</rss>
