Solved

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

Posted on 2009-07-08
4
1,897 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adobe Air with Flex on ios 2 1,128
Refresh Image 2 30 955
Flex 3 animation around the clock ..... 2 788
how can flash builder 4.X version make use of java 8 5 384
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…
In order to fulfill our mission of inspiring learning in the technology community, Experts Exchange is launching a Course of the Month program. Premium and Team Account members will have access to one course per month as a part of their membership, …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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