Solved

Flex 3 Rich Text Editor TextArea and modifying the "leading" value

Posted on 2009-07-08
4
1,885 Views
Last Modified: 2012-06-27

Is it possible to add a drop down to the RichTextEditor Toolbar that allows you to manipulate the "leading" value (line spacing)?

I tried rte2.textArea.setStyle("leading", 0), but it seems to get overridden with what comes across in the original HTMLTEXT string.

The best site I found was http://blog.flexexamples.com/2008/05/31/setting-the-leading-on-a-text-control-in-flex/, but I was unable to use the methods to manipulate this value in the RichTextEditor.

Thanks for any help you can offer!
0
Comment
Question by:20lbMonkey
  • 3
4 Comments
 
LVL 7

Expert Comment

by:nikhilmenon
ID: 24811283
I don't think you could actually go about and do that with the Control as it is. You could consider making your own component from scratch or modifying the RTE control to suit your needs. Or add a little slider (as the example suggests) next to your Rich text editor to perform the same function.
0
 
LVL 7

Expert Comment

by:nikhilmenon
ID: 24811330
Also, I tried it out with a simple RTE and two buttons which changed the leading values of the RTE to one and 10 calling the functions as shown in the code snippet. Worked just fine.
private function setToTen():void{

	rte.setStyle("leading","10");

}
 

private function setToOne():void{

	rte.setStyle("leading","1");

}

Open in new window

0
 
LVL 7

Accepted Solution

by:
nikhilmenon earned 500 total points
ID: 24811340
And I just noticed you have to put 0 in the function call enclosed within quotes. You haven't done that. Your code should be

rte2.textArea.setStyle("leading", "0")

Apologies for the multiple posts.
0
 

Author Closing Comment

by:20lbMonkey
ID: 31601447
Thank you for your mulitple posts! Its funny how you can look at something for so long and totally ignore the obvious.

Thanks again!
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now