<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Creating a LinkElement in a Spark RichEditableText control in Flex 4</title>
	<atom:link href="http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Mon, 13 Feb 2012 01:38:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ayme</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-10122</link>
		<dc:creator>Ayme</dc:creator>
		<pubDate>Thu, 03 Nov 2011 23:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-10122</guid>
		<description>Thanks Irongamer, very fine !</description>
		<content:encoded><![CDATA[<p>Thanks Irongamer, very fine !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrtew</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-7636</link>
		<dc:creator>Andrtew</dc:creator>
		<pubDate>Mon, 03 May 2010 17:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-7636</guid>
		<description>Oh My God

What with this blog!

Ok. My 2. point is that you have to have textFlow tags with emply params....</description>
		<content:encoded><![CDATA[<p>Oh My God</p>
<p>What with this blog!</p>
<p>Ok. My 2. point is that you have to have textFlow tags with emply params&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrtew</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-7635</link>
		<dc:creator>Andrtew</dc:creator>
		<pubDate>Mon, 03 May 2010 17:22:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-7635</guid>
		<description>2. There is
		&amp;lts:textFlow&amp;gt
			&amp;lts:TextFlow&amp;gt
				&amp;lts:p&amp;gt&amp;lts:a href=&quot;http://tut.ua&quot; target=&quot;_blank&quot; &amp;gt&amp;lt/s:a&amp;gt&amp;lt/s:p&amp;gt
			&amp;lt/s:TextFlow&amp;gt
		&amp;lt/s:textFlow&amp;gt</description>
		<content:encoded><![CDATA[<p>2. There is<br />
		&amp;lts:textFlow&amp;gt<br />
			&amp;lts:TextFlow&amp;gt<br />
				&amp;lts:p&amp;gt&amp;lts:a href=&#8221;http://tut.ua&#8221; target=&#8221;_blank&#8221; &amp;gt&amp;lt/s:a&amp;gt&amp;lt/s:p&amp;gt<br />
			&amp;lt/s:TextFlow&amp;gt<br />
		&amp;lt/s:textFlow&amp;gt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrtew</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-7634</link>
		<dc:creator>Andrtew</dc:creator>
		<pubDate>Mon, 03 May 2010 17:20:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-7634</guid>
		<description>This is how I do dynamic links :
			protected function button1_clickHandler(e:MouseEvent):void
			{
				var textFlow : TextFlow = textArea.textFlow;
				var p:ParagraphElement = new ParagraphElement();
				var span:SpanElement = new SpanElement();
				span.text = &quot;&gt;Test Message&quot;;
				
				var link : LinkElement = new LinkElement();
				link.addEventListener( FlowElementMouseEvent.CLICK, onLinkClick );
				var linkSpan : SpanElement = new SpanElement();
				linkSpan.text = &quot;dynamicLink&quot;;
				link.addChild( linkSpan );
				
				p.addChild( link );
				p.addChild( span );
				textFlow.addChild( p );	
			}

But it works when:
1. editable=&quot;false&quot; for text control(RET or TextArea)
2. There is 
		
			
				
			
		

I cant bypass 2. position - it is ugly, so if you know how to do this - wright please...

Thx.
Andrew.</description>
		<content:encoded><![CDATA[<p>This is how I do dynamic links :<br />
			protected function button1_clickHandler(e:MouseEvent):void<br />
			{<br />
				var textFlow : TextFlow = textArea.textFlow;<br />
				var p:ParagraphElement = new ParagraphElement();<br />
				var span:SpanElement = new SpanElement();<br />
				span.text = &#8220;&gt;Test Message&#8221;;</p>
<p>				var link : LinkElement = new LinkElement();<br />
				link.addEventListener( FlowElementMouseEvent.CLICK, onLinkClick );<br />
				var linkSpan : SpanElement = new SpanElement();<br />
				linkSpan.text = &#8220;dynamicLink&#8221;;<br />
				link.addChild( linkSpan );</p>
<p>				p.addChild( link );<br />
				p.addChild( span );<br />
				textFlow.addChild( p );<br />
			}</p>
<p>But it works when:<br />
1. editable=&#8221;false&#8221; for text control(RET or TextArea)<br />
2. There is </p>
<p>I cant bypass 2. position &#8211; it is ugly, so if you know how to do this &#8211; wright please&#8230;</p>
<p>Thx.<br />
Andrew.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Irongamer</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-6814</link>
		<dc:creator>Irongamer</dc:creator>
		<pubDate>Wed, 20 Jan 2010 23:46:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-6814</guid>
		<description>The way you apply a link has changed. Here is what worked for me.

private function createLink(link:String=”http://www.google.com”,title:String=null):void
{
var editManager:IEditManager = editor.textFlow.interactionManager as IEditManager;
editManager.applyLink(link, title);
}</description>
		<content:encoded><![CDATA[<p>The way you apply a link has changed. Here is what worked for me.</p>
<p>private function createLink(link:String=”http://www.google.com”,title:String=null):void<br />
{<br />
var editManager:IEditManager = editor.textFlow.interactionManager as IEditManager;<br />
editManager.applyLink(link, title);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sydd</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-6081</link>
		<dc:creator>sydd</dc:creator>
		<pubDate>Wed, 21 Oct 2009 13:43:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-6081</guid>
		<description>I have the same question as Lance: 
How can i add a link programatically?
Lance&#039;s solution does not work in beta 2, cause getEditManager() is a private function.
(Why dont you make funcitons like this protected??)</description>
		<content:encoded><![CDATA[<p>I have the same question as Lance:<br />
How can i add a link programatically?<br />
Lance&#8217;s solution does not work in beta 2, cause getEditManager() is a private function.<br />
(Why dont you make funcitons like this protected??)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lance</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-5661</link>
		<dc:creator>Lance</dc:creator>
		<pubDate>Thu, 10 Sep 2009 01:47:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-5661</guid>
		<description>public static function applyLink(editor:RichEditableText, link:String, title:String = null):void
{
	// call first
	var editManager:EditManager = editor.mx_internal::getEditManager() as EditManager;
	
	editManager.applyLink(link, title);
	
	// clean up
	editor.mx_internal::releaseEditManager(editManager);
}

You could do it easier, but this allows you use the advanced features of the RichEditableText&#039;s EditManager.  I had to change those two mx_internal methods from &quot;private&quot; to &quot;mx_internal&quot;, so I didn&#039;t have to copy-paste.

Best,
Lance</description>
		<content:encoded><![CDATA[<p>public static function applyLink(editor:RichEditableText, link:String, title:String = null):void<br />
{<br />
	// call first<br />
	var editManager:EditManager = editor.mx_internal::getEditManager() as EditManager;</p>
<p>	editManager.applyLink(link, title);</p>
<p>	// clean up<br />
	editor.mx_internal::releaseEditManager(editManager);<br />
}</p>
<p>You could do it easier, but this allows you use the advanced features of the RichEditableText&#8217;s EditManager.  I had to change those two mx_internal methods from &#8220;private&#8221; to &#8220;mx_internal&#8221;, so I didn&#8217;t have to copy-paste.</p>
<p>Best,<br />
Lance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lance</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-5629</link>
		<dc:creator>Lance</dc:creator>
		<pubDate>Tue, 08 Sep 2009 07:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-5629</guid>
		<description>This is great!

Any ideas how to add a LinkElement dynamically, like in the Text Editor?  Are we going to have to just add in the Element to the TextFlow at the selected index, or is it a bit more complicated?

Best,
Lance</description>
		<content:encoded><![CDATA[<p>This is great!</p>
<p>Any ideas how to add a LinkElement dynamically, like in the Text Editor?  Are we going to have to just add in the Element to the TextFlow at the selected index, or is it a bit more complicated?</p>
<p>Best,<br />
Lance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-5507</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Mon, 31 Aug 2009 15:02:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-5507</guid>
		<description>valery,

I&#039;ve never seen that. Which build of the Flex 4 SDK are you using?

Peter</description>
		<content:encoded><![CDATA[<p>valery,</p>
<p>I&#8217;ve never seen that. Which build of the Flex 4 SDK are you using?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: valery</title>
		<link>http://blog.flexexamples.com/2009/08/27/creating-a-linkelement-in-a-spark-richeditabletext-control-in-flex-4/comment-page-1/#comment-5484</link>
		<dc:creator>valery</dc:creator>
		<pubDate>Sat, 29 Aug 2009 12:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1750#comment-5484</guid>
		<description>Hello Peter, i&#039;m trying to install the last and earlier sdk nightly build for flash builder but when i run my project (build with latest stable sdk version), flex give me an error : can&#039;t find the IVIsualElement class. But, this class is steal in the sdk folder !!
I was really enjoy to use the textFlow  but i&#039;m little confused now.. do you have any idea ?

Thanks for your help and your amazing blog.
(sorry for my english)</description>
		<content:encoded><![CDATA[<p>Hello Peter, i&#8217;m trying to install the last and earlier sdk nightly build for flash builder but when i run my project (build with latest stable sdk version), flex give me an error : can&#8217;t find the IVIsualElement class. But, this class is steal in the sdk folder !!<br />
I was really enjoy to use the textFlow  but i&#8217;m little confused now.. do you have any idea ?</p>
<p>Thanks for your help and your amazing blog.<br />
(sorry for my english)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

