TLF 2.0 includes support for lists. Attached are two PDFs. The first describes the new markup and the second gives some examples:
The numbering algorithms for the various listStyleType values are defined here:
CSS3 List Style Types
Great news! A lot of people (including myself) have been waiting on this one.The ability to update from your sourceforge repository is also appreciated, as is your continued efforts to improve the framework.
The ability to update from your sourceforge repository is also appreciated, as is your continued efforts to improve the framework.
Hi to all,I had a look a the TextLayoutEditor code and I have a question:Could you explain why you coded the InspectorBox elements in XML then parse it to convert it to flex components, instead of coding it in MXML?What is the benefit that this method offers comparing to coding those views in MXML in the first place?Regards Brett
Is there any examples using the lists that you could share ? could you provide the updated spark.swc compile to work with the flex4 sdk to help the prossess of moving to TLF2.0
I got the list to work I needed to update my player to 10.1 though…When I assign a textFlow with a list tag to any flex component ie: TextArea I get an Error: Type Coercion failed: cannot convert GlobalSWFContext to mx.core.IflexModuleFactory…is there a way to work with TLF2.0 and flex components ? if not could you show the best way to use TLF2.0 in a flex appliction context, any example would be nice ;)ps:Thanks for all your hard work
Not without modifying flexhttp://blogs.adobe.com/tlf/2010/07/flex-4-updates-for-tlf-20.htmlThis is not release quality software – its our in process development. Expect every change to be included. We’ll going to work something out so you know which changes are actual builds.
Regarding the TextLayoutEditor code. That’s contributed work from another project. In the end that project didn’t really go anywhere. Anyhow that code is available to you under the license.
I did replace those two classes and this was the error I got… are you saying that it should work and that i miss something, can you chec, I ve downloaded the open source sdk 4 remplaced the 2 classes run the main ant task open the textlayout 2.0 project run the main ant task… pointed the test project to that new sdk. I got the list to show with canvas.rawChildren add sprite to show the text flow, but passing a text flow with the list to any flex components gave me that error,Thanks for your work, regards
Can I use the TLF2.0 with flash player 10 or do I need 10.1 ?
TLF 2.0 fully supports FP 10.0. 10.1 is not required.
Maybe you missed my last post,I did replace those two classes and this was the error I got… are you saying that it should work and that i miss something, can you chec, I ve downloaded the open source sdk 4 remplaced the 2 classes run the main ant task open the textlayout 2.0 project run the main ant task… pointed the test project to that new sdk. I got the list to show with canvas.rawChildren add sprite to show the text flow, but passing a text flow with the list to any flex components gave me that error,Thanks for your work, regardsI still can’t get the list to show in a TextArea
I’m not sure. This example worked for me. Can you post one that fails? One possibility is that the older textLayout swc is still available in your environment and is confusing the compiler. I’d suggest removing it completely from the modified FlexSDK.RET.mxml
Finaly I got it to work Thanks ;)Great work guys !!! when can we expect seamless interagtion with the standard html sintax with the TLF ????
Do you have an example with a toggleBtn to add and remove bullet points that we can use ?
Interesting. There is a CreateListOperation and IEditManager.createList API but no RemoveListOperatiion. I’ll look into adding that.
I got the same question with Brett Coffin, how do you make it work at the end?
I stumbled across this error on Friday. In the Project Properties –> Flex Build Path –> Library Path make sure you set Framework Linkage to “Merged into Code”. Otherwise it tries to use the older RLSs.
Indeed great news! Where can I find the API Reference on lists/TLF 2.0?
Will the lists also be a property of the ParagraphFormat class?
The source code repository includes an an ant script that will build documentation. Other than that the documentation is in this post.
The ParagraphFormat class you mentioned was removed from TLF 18 months ago. The formatting is all held in the TextLayoutFormat class.
Hello Richard, thanks for the quick reply!
What I was referring to was this class: http://livedocs.adobe.com/labs/textlayout/flashx/textLayout/formats/ParagraphFormat.html
I don’t think/hope this class has been removed?!
Long ago. That website has the docs from our Max preview build. I’m surprised its still posted.
Most recent documentation is here.
This link contains the documentation for TLF in the 1.0 and 1.1 release as included in Flex 4.0, Flex 4.1 and CS5.
I’m using both trhe ParagraphFormat and CharacterFormat class, and they are working perfect together…
Should I stop using those classes and replace them with the TextLayoutFormat class?
Aha! Now I understand the list markup documentation in this post! Great, thanks!
(Are there any other big changes since the MAX preview built I should be aware of?)
(And out of curiousity… Why have the CharacterFormat and ParagraphFormat class been removed? I kind of liked them, nice and clean! Making a difference between Paragraph and Character styles…)
Sorry for all these questions…
There were a huge number of changes between the Max prerelease and the 1.0 release. Sorry I don’t have a complete list. Much of it was described here. http://blogs.adobe.com/tlf/2009/02/tlf-api-changes-in-build-370-1.html – but even this is out of date.
Adobe has a significant API review process and we spent many hours discussing and tuning the API.
Thanks for the link, Richard!
I will check it out and try to port everthing to the 1.0/1.1 releae!
Hello Richard, just wanted to say that I ported everything to tlf 2.0 and that I’m very happy with all the new possibilities of the new version! Thanks for all the info!
Any idea on which operation to call to promote or demote a list ?
Rafique – we’re still working on those operations.
I was making a small test to see if I could make the list work with the TextLayoutFormat, but didn’t get it to work. Here’s the test:
var cs:Sprite = new Sprite();
var textFlow:TextFlow = new TextFlow();
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
textFlow.format = textLayoutFormat;
var paragraphElement = new ParagraphElement();
var paragraphFormat:TextLayoutFormat = new TextLayoutFormat();
paragraphElement.format = paragraphFormat;
paragraphFormat.listStyleType = “disc”;
paragraphFormat.listStylePosition = “outside”;
var spanElement = new SpanElement();
spanElement.text = “sdgfsd\rsdsd\rssd”;
textFlow.flowComposer.addController(new ContainerController(cs, 400, 200));
What am I doing wrong? Should you indicate that every new line should be a list element? (And if so, how do you put this into the String?)
List markers are only applied to the first paragraph in a ListItemElement. ListItemElements needs to be in a ListElement. So do this:
var list:ListElement = new ListElement()
list.listStyleType=”disc”; // note you don’t need to create a new TextLayoutFormat
var item:ListItemElement = new ListItemElement();
Check the examples for more information. They’re done with markup but it translates to the same thing.
O.k. Richard, thanks a lot again!
Were you able to create a method to remove bullets?
TLF 2.0 has the MoveChildrenOperation. You can use it to move the children of a ListElement to its parent and unbullet the list.
please give me a way to create a dynamic table in TLF, can we add custom component in TLF in a specific position.. please ASAP..
Table is not supported till 3.0.
It’s difficult to add custom component in TLF. Some are even final classes.
hi, can we add image with drag & drop properties in tlf?with respective interaction manager?
It needs to be implemented on your own.
Hi to all!
Can anyone explain me how is working MoveChildrenOperation? Would appreciate an example of using.
Also, can I check if selected text is list?
Thanks a lot!
I need example how to convert selected list to plain text programatically in RichEditableText.
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.