[ 
https://issues.apache.org/jira/browse/FLEX-34876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14570075#comment-14570075
 ] 

Harbs commented on FLEX-34876:
------------------------------

Here is a sample app which illustrates the problem:

<?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:mx="library://ns.adobe.com/flex/mx" 
minWidth="955" minHeight="600" creationComplete="onComplete()">
        <fx:Script>
                <![CDATA[
                        import flashx.textLayout.container.ContainerController;
                        import flashx.textLayout.conversion.TextConverter;
                        import flashx.textLayout.edit.EditManager;
                        import flashx.textLayout.edit.TextClipboard;
                        import flashx.textLayout.edit.TextScrap;
                        import flashx.textLayout.elements.ParagraphElement;
                        import flashx.textLayout.elements.SpanElement;
                        import flashx.textLayout.elements.TextFlow;
                        import flashx.textLayout.tlf_internal;
                        import flashx.undo.UndoManager;

                        private var textFlow:TextFlow;
                        private var controller:ContainerController;
                        private var undoManager:UndoManager;
                        use namespace tlf_internal;

                        private function onComplete():void
                        {
                                textFlow = new TextFlow();
                                undoManager = new UndoManager();
                                textFlow.interactionManager = new 
EditManager(undoManager);
                                var para:ParagraphElement = new 
ParagraphElement();
                                var span:SpanElement = new SpanElement();
                                span.color = 0xFF0000;
                                span.fontSize = 20;
                                para.addChild(span);
                                textFlow.addChild(para);
                                
                                controller = new ContainerController(holder);
                                textFlow.flowComposer.addController(controller);
                                textFlow.flowComposer.updateAllControllers();
                                (textFlow.interactionManager as 
EditManager).selectAll();
                                var scrap:TextScrap = 
TextClipboard.importToScrap("line 1\nline 2\nline 3\nline 4\nline 
5",TextConverter.PLAIN_TEXT_FORMAT);
                                (textFlow.interactionManager as 
EditManager).pasteTextScrap(scrap);

                        }
                        
                ]]>
        </fx:Script>
        <s:SpriteVisualElement id="holder" width="100%" height="100%"/>
</s:Application>


> Paste Problem with multiple paragraphs
> --------------------------------------
>
>                 Key: FLEX-34876
>                 URL: https://issues.apache.org/jira/browse/FLEX-34876
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: TLF
>            Reporter: Harbs
>            Assignee: Harbs
>
> Pasting multiple lines of plain text causes default styling in the middle 
> paragraphs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to