Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
Windows 7 , chrome/firefox/ie11, Adobe® Flash® Builderâ„¢® 4.7, Apache Flex 4.14.1,
Description
When you copy/paste a text with style effect (bold, italic, ...) at the end of a RichEditableText / RichTextEditor, the paste text is cropped and you have an Error #1009.
Test code :
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" xmlns:EmbedWS="EmbedWS." xmlns:local="">
<fx:Declarations>
<!-local:WSLoader id="ws" xmlns:local="*"></local:WSLoader->
</fx:Declarations>
<fx:Script>
<![CDATA[
import flash.text.engine.FontWeight;
import flashx.textLayout.conversion.ConversionType;
import flashx.textLayout.conversion.TextConverter;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
public function setTextFlow ():TextFlow
{ var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); var span3:SpanElement = new SpanElement(); span1.text = "Hello, bla bla bla "; span2.text = "bold content"; span3.text = " blabla bla."; span2.fontWeight = FontWeight.BOLD; p.addChild(span1); p.addChild(span2); p.addChild(span3); textFlow.addChild(p); return textFlow; }public function display_tlf ():String
{ var tlf = TextConverter.export( rte.textFlow, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE).toString(); return tlf; } ]]>
</fx:Script>
<s:applicationComplete>
</s:applicationComplete>
<s:VGroup left="10" right="10" top="10" bottom="10">
<s:RichEditableText id="rte" width="100%" height="25%" textFlow="
"></s:RichEditableText>
<s:HGroup>
<s:Button label="Show tlf Text" click="tlfText.text = display_tlf();"/>
</s:HGroup>
<s:TextArea id="tlfText" width="100%" height="25%"/>
<s:HGroup>
<s:Button label="Show Plain Text" click="rteText.text = rte.text;"/>
</s:HGroup>
<s:TextArea id="rteText" width="100%" height="25%"/>
</s:VGroup>
</s:Application>
Attachments
Issue Links
- duplicates
-
FLEX-34807 TLF - EditManager - TextFlowEdit -insertTextScrap
- Resolved