You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by leokan23 <le...@best-web.gr> on 2016/06/04 10:17:28 UTC
Typography in Labels
is there a way to achieve typography in labels? We use a lot of typography in
our apps and most of the times i have to make a group with multiple labels
to achieve these. Is there an easier way?
ex. this *has some* typography
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Typography-in-Labels-tp12799.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Typography in Labels
Posted by Fréderic Cox <co...@gmail.com>.
It's pretty sophisticated. However when I am done with it I might try to
port it to FlexJS as I really want to start playing with it.
I am going forward with a webview containing an HTMLEditor now in HTML/JS.
On Wed, Jun 8, 2016 at 1:56 AM, Alex Harui <ah...@adobe.com> wrote:
>
>
> On 6/7/16, 1:39 PM, "Fréderic Cox" <co...@gmail.com> wrote:
>
> >Hi Alex,
> >
> >I just tested this. I removed the mx from source and added both mx.swc and
> >sparkskins.mx. Now I was able to add mx:RichTextEditor into my project.
> It
> >shows on the mobile device too. Unfortunately the issue with the text area
> >showing HTML but not in "edit" mode stays the same. I don't see how a
> >spark
> >textinput could be used by the app here. In RichTextEditor.mxml
> >clearly a mx:TextArea
> >is used. Thanks for your suggestions but it seems this can not be done. I
> >am unable to edit HTML/TextFlow on mobile using Flex :-(
>
> Hmm. Maybe other mobile text experts can confirm that this is expected
> behavior. I would expect that there should be a way to control the input
> font. Maybe mx:RichTextEditor isn't set up correctly since it was never
> certified for mobile.
>
> >
> >I might pursue the idea of using a webview with a HTML input field which
> >opens another webview in popup that show the HTML editor. And then passing
> >the results via JS to the Flex app. I think this is the only way it can be
> >done.
>
> I don't know how sophisticated your app is, but it might be interesting to
> try FlexJS.
>
> -Alex
>
>
>
Re: Typography in Labels
Posted by Alex Harui <ah...@adobe.com>.
On 6/7/16, 1:39 PM, "Fréderic Cox" <co...@gmail.com> wrote:
>Hi Alex,
>
>I just tested this. I removed the mx from source and added both mx.swc and
>sparkskins.mx. Now I was able to add mx:RichTextEditor into my project. It
>shows on the mobile device too. Unfortunately the issue with the text area
>showing HTML but not in "edit" mode stays the same. I don't see how a
>spark
>textinput could be used by the app here. In RichTextEditor.mxml
>clearly a mx:TextArea
>is used. Thanks for your suggestions but it seems this can not be done. I
>am unable to edit HTML/TextFlow on mobile using Flex :-(
Hmm. Maybe other mobile text experts can confirm that this is expected
behavior. I would expect that there should be a way to control the input
font. Maybe mx:RichTextEditor isn't set up correctly since it was never
certified for mobile.
>
>I might pursue the idea of using a webview with a HTML input field which
>opens another webview in popup that show the HTML editor. And then passing
>the results via JS to the Flex app. I think this is the only way it can be
>done.
I don't know how sophisticated your app is, but it might be interesting to
try FlexJS.
-Alex
Re: Typography in Labels
Posted by Fréderic Cox <co...@gmail.com>.
Hi Alex,
I just tested this. I removed the mx from source and added both mx.swc and
sparkskins.mx. Now I was able to add mx:RichTextEditor into my project. It
shows on the mobile device too. Unfortunately the issue with the text area
showing HTML but not in "edit" mode stays the same. I don't see how a spark
textinput could be used by the app here. In RichTextEditor.mxml
clearly a mx:TextArea
is used. Thanks for your suggestions but it seems this can not be done. I
am unable to edit HTML/TextFlow on mobile using Flex :-(
I might pursue the idea of using a webview with a HTML input field which
opens another webview in popup that show the HTML editor. And then passing
the results via JS to the Flex app. I think this is the only way it can be
done.
On Tue, Jun 7, 2016 at 5:04 PM, Alex Harui <ah...@adobe.com> wrote:
>
>
> On 6/7/16, 6:49 AM, "Fréderic Cox" <co...@gmail.com> wrote:
>
> >Also I tried to use mx:TextArea (which compiles fine). The TextArea shows
> >the HTML formatted text until we edit it. Then the text format is lost due
> >to the native textinput being overlayed I guess. Since mx:RichtTextEditor
> >uses an mx:TextArea internally this is not a viable option either.
>
> I haven't tried it myself, but what you are seeing doesn't sound like
> things are configured correctly. AIUI, (I could definitely be wrong,
> though), a TextField-based TextArea doesn't popup an input widget like a
> StageText. If you want to pursue this further, make sure in your last
> attempt that the app didn't somehow end up using Spark TextArea.
>
> Regarding your prior post about a compile problem, it looks like your app
> is trying to access mx:RichTextEditor by setting up a source path to the
> source file. But since MX libraries are not included by default in Mobile
> projects, have you included the MX library? Then you shouldn't need the
> source path.
>
> TextField "should" have the ability to control the font on each keystroke.
> You might want to test out a non-mobile version of mx:RichTextEditor to
> make sure it works as expected then compare what you get on mobile.
>
> HTH,
> -Alex
>
>
Re: Typography in Labels
Posted by Alex Harui <ah...@adobe.com>.
On 6/7/16, 6:49 AM, "Fréderic Cox" <co...@gmail.com> wrote:
>Also I tried to use mx:TextArea (which compiles fine). The TextArea shows
>the HTML formatted text until we edit it. Then the text format is lost due
>to the native textinput being overlayed I guess. Since mx:RichtTextEditor
>uses an mx:TextArea internally this is not a viable option either.
I haven't tried it myself, but what you are seeing doesn't sound like
things are configured correctly. AIUI, (I could definitely be wrong,
though), a TextField-based TextArea doesn't popup an input widget like a
StageText. If you want to pursue this further, make sure in your last
attempt that the app didn't somehow end up using Spark TextArea.
Regarding your prior post about a compile problem, it looks like your app
is trying to access mx:RichTextEditor by setting up a source path to the
source file. But since MX libraries are not included by default in Mobile
projects, have you included the MX library? Then you shouldn't need the
source path.
TextField "should" have the ability to control the font on each keystroke.
You might want to test out a non-mobile version of mx:RichTextEditor to
make sure it works as expected then compare what you get on mobile.
HTH,
-Alex
Re: Typography in Labels
Posted by Fréderic Cox <co...@gmail.com>.
Also I tried to use mx:TextArea (which compiles fine). The TextArea shows
the HTML formatted text until we edit it. Then the text format is lost due
to the native textinput being overlayed I guess. Since mx:RichtTextEditor
uses an mx:TextArea internally this is not a viable option either.
On Tue, Jun 7, 2016 at 3:14 PM, Fréderic Cox <co...@gmail.com> wrote:
> Hi Alex,
>
> If I add mx:RichtTextEditor in my code I get:
>
> - Description Resource Path Location Type
> Could not resolve <mx:Panel> to a component implementation.
> RichTextEditor.mxml /CFShopManagerMobile/[source path] src/mx/controls line
> 206 Flex Problem
>
>
> On Mon, Jun 6, 2016 at 10:20 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Pretty sure that's the Spark version. Try mx.controls.RichTextEditor. It
>> does not use TLF.
>>
>> On 6/6/16, 12:13 PM, "Fréderic Cox" <co...@gmail.com> wrote:
>>
>> >On iOS the RichTextEditor does not work due to
>> >https://bugbase.adobe.com/index.cfm?event=bug&id=3962712
>> >
>> >On Mon, Jun 6, 2016 at 9:09 PM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >>
>> >>
>> >> On 6/6/16, 4:01 AM, "leokan23" <le...@best-web.gr> wrote:
>> >>
>> >> >I have never used it. I will give it a try and see if that works for
>> >>me.
>> >> >Thank you
>> >> >
>> >>
>> >> There is an MXML mx.controls.RichTextEditor component if you need
>> >>editing.
>> >> Again, it may be too limited for your needs.
>> >>
>> >> -Alex
>> >>
>> >>
>>
>>
>
Re: Typography in Labels
Posted by Fréderic Cox <co...@gmail.com>.
Hi Alex,
If I add mx:RichtTextEditor in my code I get:
- Description Resource Path Location Type
Could not resolve <mx:Panel> to a component implementation.
RichTextEditor.mxml /CFShopManagerMobile/[source path] src/mx/controls line
206 Flex Problem
On Mon, Jun 6, 2016 at 10:20 PM, Alex Harui <ah...@adobe.com> wrote:
> Pretty sure that's the Spark version. Try mx.controls.RichTextEditor. It
> does not use TLF.
>
> On 6/6/16, 12:13 PM, "Fréderic Cox" <co...@gmail.com> wrote:
>
> >On iOS the RichTextEditor does not work due to
> >https://bugbase.adobe.com/index.cfm?event=bug&id=3962712
> >
> >On Mon, Jun 6, 2016 at 9:09 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >>
> >>
> >> On 6/6/16, 4:01 AM, "leokan23" <le...@best-web.gr> wrote:
> >>
> >> >I have never used it. I will give it a try and see if that works for
> >>me.
> >> >Thank you
> >> >
> >>
> >> There is an MXML mx.controls.RichTextEditor component if you need
> >>editing.
> >> Again, it may be too limited for your needs.
> >>
> >> -Alex
> >>
> >>
>
>
Re: Typography in Labels
Posted by Alex Harui <ah...@adobe.com>.
Pretty sure that's the Spark version. Try mx.controls.RichTextEditor. It
does not use TLF.
On 6/6/16, 12:13 PM, "Fréderic Cox" <co...@gmail.com> wrote:
>On iOS the RichTextEditor does not work due to
>https://bugbase.adobe.com/index.cfm?event=bug&id=3962712
>
>On Mon, Jun 6, 2016 at 9:09 PM, Alex Harui <ah...@adobe.com> wrote:
>
>>
>>
>> On 6/6/16, 4:01 AM, "leokan23" <le...@best-web.gr> wrote:
>>
>> >I have never used it. I will give it a try and see if that works for
>>me.
>> >Thank you
>> >
>>
>> There is an MXML mx.controls.RichTextEditor component if you need
>>editing.
>> Again, it may be too limited for your needs.
>>
>> -Alex
>>
>>
Re: Typography in Labels
Posted by Fréderic Cox <co...@gmail.com>.
On iOS the RichTextEditor does not work due to
https://bugbase.adobe.com/index.cfm?event=bug&id=3962712
On Mon, Jun 6, 2016 at 9:09 PM, Alex Harui <ah...@adobe.com> wrote:
>
>
> On 6/6/16, 4:01 AM, "leokan23" <le...@best-web.gr> wrote:
>
> >I have never used it. I will give it a try and see if that works for me.
> >Thank you
> >
>
> There is an MXML mx.controls.RichTextEditor component if you need editing.
> Again, it may be too limited for your needs.
>
> -Alex
>
>
Re: Typography in Labels
Posted by Alex Harui <ah...@adobe.com>.
On 6/6/16, 4:01 AM, "leokan23" <le...@best-web.gr> wrote:
>I have never used it. I will give it a try and see if that works for me.
>Thank you
>
There is an MXML mx.controls.RichTextEditor component if you need editing.
Again, it may be too limited for your needs.
-Alex
Re: Typography in Labels
Posted by leokan23 <le...@best-web.gr>.
I have never used it. I will give it a try and see if that works for me.
Thank you
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Typography-in-Labels-tp12799p12804.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Typography in Labels
Posted by Alex Harui <ah...@adobe.com>.
Have you tried the limited HTML support in TextField?
-Alex
On 6/5/16, 3:20 PM, "leokan23" <le...@best-web.gr> wrote:
>Hi Alex,
>
>sorry, i forgot to specify that i work 100% on mobile. From what i
>understand, TFL is not to be used in mobile due to performance.
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Typography-in-Labels-tp1279
>9p12802.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Typography in Labels
Posted by OmPrakash Muppirala <bi...@gmail.com>.
For editing, you have to use the native text (via StageText) which strips
any formatting added by TLF. So, you wont be able to do in place editing
like on the desktop.
But you can update the TLF component as you type in a separate text input
component using the OS soft keyboard - and it will render everything
properly.
Thanks,
Om
On Mon, Jun 6, 2016 at 11:54 AM, Fréderic Cox <co...@gmail.com> wrote:
> But you can't edit TLF on mobile, right? How would you do that?
>
> On Mon, Jun 6, 2016 at 3:04 PM, Harbs <ha...@gmail.com> wrote:
>
> > As long as you are not constantly re-rendering the TLF text, it’s fine
> for
> > mobile.
> >
> > On Jun 5, 2016, at 6:20 PM, leokan23 <le...@best-web.gr> wrote:
> >
> > > Hi Alex,
> > >
> > > sorry, i forgot to specify that i work 100% on mobile. From what i
> > > understand, TFL is not to be used in mobile due to performance.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/Typography-in-Labels-tp12799p12802.html
> > > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >
> >
>
Re: Typography in Labels
Posted by Fréderic Cox <co...@gmail.com>.
But you can't edit TLF on mobile, right? How would you do that?
On Mon, Jun 6, 2016 at 3:04 PM, Harbs <ha...@gmail.com> wrote:
> As long as you are not constantly re-rendering the TLF text, it’s fine for
> mobile.
>
> On Jun 5, 2016, at 6:20 PM, leokan23 <le...@best-web.gr> wrote:
>
> > Hi Alex,
> >
> > sorry, i forgot to specify that i work 100% on mobile. From what i
> > understand, TFL is not to be used in mobile due to performance.
> >
> >
> >
> > --
> > View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Typography-in-Labels-tp12799p12802.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
Re: Typography in Labels
Posted by Harbs <ha...@gmail.com>.
As long as you are not constantly re-rendering the TLF text, it’s fine for mobile.
On Jun 5, 2016, at 6:20 PM, leokan23 <le...@best-web.gr> wrote:
> Hi Alex,
>
> sorry, i forgot to specify that i work 100% on mobile. From what i
> understand, TFL is not to be used in mobile due to performance.
>
>
>
> --
> View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Typography-in-Labels-tp12799p12802.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Typography in Labels
Posted by leokan23 <le...@best-web.gr>.
Hi Alex,
sorry, i forgot to specify that i work 100% on mobile. From what i
understand, TFL is not to be used in mobile due to performance.
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Typography-in-Labels-tp12799p12802.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Typography in Labels
Posted by Alex Harui <ah...@adobe.com>.
On 6/4/16, 3:17 AM, "leokan23" <le...@best-web.gr> wrote:
>is there a way to achieve typography in labels? We use a lot of
>typography in
>our apps and most of the times i have to make a group with multiple labels
>to achieve these. Is there an easier way?
TLF doesn't work for you?
-Alex