Solved

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

Posted on 2009-07-08
4
1,891 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Flex organization chart 5 612
AS3 Image Edit Package 3 558
looking for noob/pro flash game developers to grow with 4 656
ComboBox ItemRenderer inside Datagrid 2 1,063
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…
As a business owner, there are many things that keep you up at night. Profit margins, employee retention, human resource protocols, whether your product or service will remain competitive. When you own or manage a technology company that operates la…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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