?
Solved

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

Posted on 2009-07-08
4
Medium Priority
?
1,911 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 1500 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

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 month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

801 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