You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Nitin Gopi <ni...@gmail.com> on 2013/11/14 15:23:42 UTC

Rich Text Editor -- convert the text into HTML format

Hi
I am using a rich text editor in flex 3.6
I have to send the HTML formatted text to the backend service which uses
PHP. There the code is used to create pdf. Conversion from textformat to
html tags is the work which I have to do. Currently I am trying to do it
using regular expression. I am replacing the textformat tags with html tags
like

<TEXTFORMAT LEADING="2"> --->   <HTML>
<li>ere</li><li>ere</li>  --> <ul><li>err</li><li>ere</li></ul>

Is there some library or functionality which does it automatically?

Thanks
Nitin Gopi
-- 
You can only depend on yourself. The cavalry ain't coming.

Re: Rich Text Editor -- convert the text into HTML format

Posted by Tom Chiverton <tc...@extravision.com>.
I think you can either create a new ConversionType (and suitable 
interface, exporter class), or look into transforming the results of the 
passing the XML type flag to the existing exporter.

I'd probably go with the later. You may get lucky and not even need XSLT...

Tom

On 14/11/2013 14:23, Nitin Gopi wrote:
> Hi
> I am using a rich text editor in flex 3.6
> I have to send the HTML formatted text to the backend service which uses
> PHP. There the code is used to create pdf. Conversion from textformat to
> html tags is the work which I have to do. Currently I am trying to do it
> using regular expression. I am replacing the textformat tags with html tags
> like
>
> <TEXTFORMAT LEADING="2"> --->   <HTML>
> <li>ere</li><li>ere</li>  --> <ul><li>err</li><li>ere</li></ul>
>
> Is there some library or functionality which does it automatically?
>
> Thanks
> Nitin Gopi


Re: AW: Textinput in HGroup -> width

Posted by Alex Harui <ah...@adobe.com>.
That may work in many cases, but it looks like he has an Hgroup with a
button on the right, so I'm not sure it will work here.

Setting textInput's width="100%" should work.  You may also need to add to
TextInput a minWidth="0" or some useful small number.

-Alex

On 11/14/13 7:40 AM, "christofer.dutz@c-ware.de"
<ch...@c-ware.de> wrote:

>Hi Frank,
>
>well I assume you have a component that contains the Input field. If you
>want the Input field to expand to 100% of the parent but not blow up the
>parent, using right="0" and left="0" instead of width="100%" should do
>the trick.
>
>Chris
>
>________________________________________
>Von: Frank Dahmen [frank@dahmenia.de]
>Gesendet: Donnerstag, 14. November 2013 16:31
>An: users@flex.apache.org
>Betreff: Re: Textinput in HGroup -> width
>
>thanks,
>do you mean the HGroup or the textinput where not to set the width?
>the parent of the HGroup is a VGroup.....
>left  and right in a HGroup (VGroup) works???
>
>(asking because i can't test it directly, it's mobile , on my phone it's
>ok but on another (not here) the textipnut is too big)
>
>
>
>
>Am 14.11.2013 16:20, schrieb christofer.dutz@c-ware.de:
>> Hi Frank,
>>
>> Instead of width="100%" set left and right to 0 ... at least this is
>>how I usually do it.
>>
>> Chris
>>
>> ________________________________________
>> Von: Frank Dahmen [frank@dahmenia.de]
>> Gesendet: Donnerstag, 14. November 2013 16:17
>> An: users@flex.apache.org
>> Betreff: Textinput in HGroup -> width
>>
>> Hi,
>>
>> with this mxml the TextInput is too large
>> also if i set the width of the TextInput to 100%
>>
>> how can i tell the textinput to take only as much space as available (in
>> the parent of the HGroup)?
>>
>>
>> <s:HGroup width="100%" paddingRight="10">
>>        <s:TextInput skinClass="spark.skins.mobile.TextInputSkin" />
>>       <s:Button  width="50"  height="50"/>
>> </s:HGroup>
>>
>>
>> Thanks


AW: Textinput in HGroup -> width

Posted by "christofer.dutz@c-ware.de" <ch...@c-ware.de>.
Hi Frank,

well I assume you have a component that contains the Input field. If you want the Input field to expand to 100% of the parent but not blow up the parent, using right="0" and left="0" instead of width="100%" should do the trick.

Chris

________________________________________
Von: Frank Dahmen [frank@dahmenia.de]
Gesendet: Donnerstag, 14. November 2013 16:31
An: users@flex.apache.org
Betreff: Re: Textinput in HGroup -> width

thanks,
do you mean the HGroup or the textinput where not to set the width?
the parent of the HGroup is a VGroup.....
left  and right in a HGroup (VGroup) works???

(asking because i can't test it directly, it's mobile , on my phone it's
ok but on another (not here) the textipnut is too big)




Am 14.11.2013 16:20, schrieb christofer.dutz@c-ware.de:
> Hi Frank,
>
> Instead of width="100%" set left and right to 0 ... at least this is how I usually do it.
>
> Chris
>
> ________________________________________
> Von: Frank Dahmen [frank@dahmenia.de]
> Gesendet: Donnerstag, 14. November 2013 16:17
> An: users@flex.apache.org
> Betreff: Textinput in HGroup -> width
>
> Hi,
>
> with this mxml the TextInput is too large
> also if i set the width of the TextInput to 100%
>
> how can i tell the textinput to take only as much space as available (in
> the parent of the HGroup)?
>
>
> <s:HGroup width="100%" paddingRight="10">
>        <s:TextInput skinClass="spark.skins.mobile.TextInputSkin" />
>       <s:Button  width="50"  height="50"/>
> </s:HGroup>
>
>
> Thanks

Re: Textinput in HGroup -> width

Posted by Frank Dahmen <fr...@dahmenia.de>.
thanks,
do you mean the HGroup or the textinput where not to set the width?
the parent of the HGroup is a VGroup.....
left  and right in a HGroup (VGroup) works???

(asking because i can't test it directly, it's mobile , on my phone it's 
ok but on another (not here) the textipnut is too big)




Am 14.11.2013 16:20, schrieb christofer.dutz@c-ware.de:
> Hi Frank,
>
> Instead of width="100%" set left and right to 0 ... at least this is how I usually do it.
>
> Chris
>
> ________________________________________
> Von: Frank Dahmen [frank@dahmenia.de]
> Gesendet: Donnerstag, 14. November 2013 16:17
> An: users@flex.apache.org
> Betreff: Textinput in HGroup -> width
>
> Hi,
>
> with this mxml the TextInput is too large
> also if i set the width of the TextInput to 100%
>
> how can i tell the textinput to take only as much space as available (in
> the parent of the HGroup)?
>
>
> <s:HGroup width="100%" paddingRight="10">
>        <s:TextInput skinClass="spark.skins.mobile.TextInputSkin" />
>       <s:Button  width="50"  height="50"/>
> </s:HGroup>
>
>
> Thanks


AW: Textinput in HGroup -> width

Posted by "christofer.dutz@c-ware.de" <ch...@c-ware.de>.
Hi Frank, 

Instead of width="100%" set left and right to 0 ... at least this is how I usually do it.

Chris

________________________________________
Von: Frank Dahmen [frank@dahmenia.de]
Gesendet: Donnerstag, 14. November 2013 16:17
An: users@flex.apache.org
Betreff: Textinput in HGroup -> width

Hi,

with this mxml the TextInput is too large
also if i set the width of the TextInput to 100%

how can i tell the textinput to take only as much space as available (in
the parent of the HGroup)?


<s:HGroup width="100%" paddingRight="10">
      <s:TextInput skinClass="spark.skins.mobile.TextInputSkin" />
     <s:Button  width="50"  height="50"/>
</s:HGroup>


Thanks

Textinput in HGroup -> width

Posted by Frank Dahmen <fr...@dahmenia.de>.
Hi,

with this mxml the TextInput is too large
also if i set the width of the TextInput to 100%

how can i tell the textinput to take only as much space as available (in 
the parent of the HGroup)?


<s:HGroup width="100%" paddingRight="10">
      <s:TextInput skinClass="spark.skins.mobile.TextInputSkin" />
     <s:Button  width="50"  height="50"/>
</s:HGroup>


Thanks


Re: Rich Text Editor -- convert the text into HTML format

Posted by Nitin Gopi <ni...@gmail.com>.
Yes sure I will be glad to do that. In fact I have started working on it
using regular expression.


On Thu, Nov 14, 2013 at 9:34 PM, Mark Fuqua <ma...@availdata.com> wrote:

> I have to do this same thing (different backend, but the same
> activity...converting Flex 3 rich text to valid html)...if you
> find/discover/create a solution, would you share?
>
> Mark
>
> -----Original Message-----
> From: Nitin Gopi [mailto:nitin.gopi@gmail.com]
> Sent: Thursday, November 14, 2013 9:24 AM
> To: flex_india@googlegroups.com; users@flex.apache.org
> Subject: Rich Text Editor -- convert the text into HTML format
>
> Hi
> I am using a rich text editor in flex 3.6 I have to send the HTML formatted
> text to the backend service which uses PHP. There the code is used to
> create
> pdf. Conversion from textformat to html tags is the work which I have to
> do.
> Currently I am trying to do it using regular expression. I am replacing the
> textformat tags with html tags like
>
> <TEXTFORMAT LEADING="2"> --->   <HTML>
> <li>ere</li><li>ere</li>  --> <ul><li>err</li><li>ere</li></ul>
>
> Is there some library or functionality which does it automatically?
>
> Thanks
> Nitin Gopi
> --
> You can only depend on yourself. The cavalry ain't coming.
>
>
>


-- 
You can only depend on yourself. The cavalry ain't coming.

RE: Rich Text Editor -- convert the text into HTML format

Posted by Mark Fuqua <ma...@availdata.com>.
I have to do this same thing (different backend, but the same
activity...converting Flex 3 rich text to valid html)...if you
find/discover/create a solution, would you share?

Mark

-----Original Message-----
From: Nitin Gopi [mailto:nitin.gopi@gmail.com] 
Sent: Thursday, November 14, 2013 9:24 AM
To: flex_india@googlegroups.com; users@flex.apache.org
Subject: Rich Text Editor -- convert the text into HTML format

Hi
I am using a rich text editor in flex 3.6 I have to send the HTML formatted
text to the backend service which uses PHP. There the code is used to create
pdf. Conversion from textformat to html tags is the work which I have to do.
Currently I am trying to do it using regular expression. I am replacing the
textformat tags with html tags like

<TEXTFORMAT LEADING="2"> --->   <HTML>
<li>ere</li><li>ere</li>  --> <ul><li>err</li><li>ere</li></ul>

Is there some library or functionality which does it automatically?

Thanks
Nitin Gopi
--
You can only depend on yourself. The cavalry ain't coming.