flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Matheson <smathe...@intralinks.com>
Subject RE: <BR> in TextArea
Date Thu, 03 Apr 2014 20:38:52 GMT
thanks, that interesting  and works give me a direction, unfortunialty not what i want to achieve

maybe i am starting from the wrong place, i want text that the student can click, on, each
click plays a voice recording

i achieve this by add each sentence s a




________________________________________
From: omuppi1@gmail.com [omuppi1@gmail.com] on behalf of OmPrakash Muppirala [bigosmallm@gmail.com]
Sent: Thursday, April 03, 2014 9:23 PM
To: users@flex.apache.org
Subject: Re: <BR> in TextArea

That's interesting.  Here is how I tested this hack and and does seem to
work for me:

Using this textflow xml:

<?xml version="1.0" encoding="utf-8"?>
<flow:TextFlow whiteSpaceCollapse="preserve" xmlns:flow="
http://ns.adobe.com/textLayout/2008
"><flow:p><flow:span>sentence1&#13;</flow:span></flow:p><flow:p><flow:span></flow:span></flow:p><flow:p><flow:span>sentence2&#13;</flow:span></flow:p><flow:p><flow:span></flow:span></flow:p><flow:p><flow:span>sentence3&#13;</flow:span></flow:p><flow:p><flow:span></flow:span></flow:p></flow:TextFlow>

In the online TLF editor here [1], click on the 'Markup...' button.  In the
panel that shows up, copy and paste the above textflow xml.  Then click
'Import'.  The end result seems to be what you wanted.

You may have to adapt this to your use workflow somehow.

Thanks,
Om

[1] http://www.adobe.com/devnet-apps/tlf/demo/


On Thu, Apr 3, 2014 at 1:10 PM, Scott Matheson <smatheson@intralinks.com>wrote:

> Om
>     I am an old fashioned hacker, :)  so did i undeeratsnd you suggestion?
> i tried this with out any lic
>
> var linkWrapper:LinkElement = new LinkElement();
> linkWrapper.addEventListener(FlowElementMouseEvent.MOUSE_UP,
> clickActionHandle(model.clip));
> var sentence:SpanElement = new SpanElement();
>
> var ss:String = " Lorem ... diam.&#13; Morbi ... diam.&#13; Morbi ...
> vitae";
>
> sentence.text = ss;
>
>
> linkWrapper.addChild(sentence);
> paragraphArea.addChild(linkWrapper);
>
>
> i just end up with the .&#13  in the textArea
>
> <s:TextArea id="ta" minHeight="0"  width="100%" editable="false"  >
>                         <s:p id="paragraphArea" paragraphSpaceBefore="0">
>                         </s:p>
> </s:TextArea>
>
>
>
>
> ________________________________________
> From: omuppi1@gmail.com [omuppi1@gmail.com] on behalf of OmPrakash
> Muppirala [bigosmallm@gmail.com]
> Sent: Thursday, April 03, 2014 6:51 AM
> To: users@flex.apache.org
> Subject: Re: <BR> in TextArea
>
> According to the docs [1] the breakelement gets converted into newline
> character and hence does not appear in TextFlow markup.
>
> As a hack, you can try inserting &#13; where you want a <br>
> Again, if you export the markup, the &#13; will get replaced by a newline
> character.  But at least your display would look like how you want.
>
> Thanks,
> Om
>
> [1] http://blogs.adobe.com/tlf/category/tlf
>
> On Wed, Apr 2, 2014 at 1:50 PM, Scott Matheson <smatheson@intralinks.com
> >wrote:
>
> > Hi
> >    I am trying to build a Paragraph from sentences,
> >
> > this builds the Paragraph (from am XML file and itemRender)
> >
> > the build function looks like
> >
> >
> > var linkWrapper:LinkElement = new LinkElement();
> >
> > var sentence:SpanElement = new SpanElement();
> >
> > sentence.styleName = 'linkStyle';
> >
> > sentence.textDecoration = TextDecoration.NONE;
> >
> > sentence.text = model.text + " ";
> >
> > linkWrapper.addChild(sentence);
> >
> > paragraphArea.addChild(linkWrapper);
> >
> >
> >
> > Layout
> >
> >
> >
> > <s:TextArea id="ta" minHeight="0"  width="100%" editable="false"
> >
> > <s:p id="paragraphArea" paragraphSpaceBefore="0">
> >
> > </s:p>
> >
> > </s:TextArea>
> >
> >
> >
> > I get
> >
> >
> > sentence1
> >
> > sentence2
> >
> > sentence3
> >
> >
> >
> > my problem is how to i add a <br> in to the Paragraph and end up with
> >
> >
> > sentence1
> >
> >
> > sentence2
> >
> >
> > sentence3
> >
> >
> >
> > it would be good if the  input text  model.text  could be
> > "sentence1<br>sentence2<br>sentence3"
> >
> >
> >
> >
> >
> > ________________________________
> >
> > Disclaimer: This electronic mail and any attachments are confidential and
> > may be privileged. If you are not the intended recipient, please notify
> the
> > sender immediately by replying to this email, and destroy all copies of
> > this email and any attachments. Thank you.
> >
>
> ________________________________
>
> Disclaimer: This electronic mail and any attachments are confidential and
> may be privileged. If you are not the intended recipient, please notify the
> sender immediately by replying to this email, and destroy all copies of
> this email and any attachments. Thank you.
>

________________________________

Disclaimer: This electronic mail and any attachments are confidential and may be privileged.
If you are not the intended recipient, please notify the sender immediately by replying to
this email, and destroy all copies of this email and any attachments. Thank you.

Mime
View raw message