Hi Curtis,

I realized that the implementation is very simple using your 
SparkRichTextEditorToolbar:

<piematrix:SparkRichTextEditorToolBar id="toolbar"/>
<s:TextArea id="ta1" focusIn="{toolbar.textArea = ta1}" 
width="{toolbar.width}"/>
<s:TextArea id="ta2" focusIn="{toolbar.textArea = ta2}" 
width="{toolbar.width}"/>

Works like a charm! We don't need a RichTextEditor this way, just stack up some 
TextArea's.

I suggest to rename SparkRichTextEditorToolBar to TextAreaFormattingToolbar
I think this would be a valuable addition to the sdk.

thanks for the help!

Dany



Op 26 feb 2015 om 00:42 uur uur schreef Curtis Aube <curtis.a...@piematrix.com>:

Hey Dany,

Interesting. I originally wrote it in a way that would support this use case 
quite well. Basically the toolbar and the TextArea were separate so you could 
fairly easily change which TextArea the toolbar affected.

The code is still available here: 
https://github.com/cjaube/piematrix/tree/master/SparkRichTextEditorProject 
<https://github.com/cjaube/piematrix/tree/master/SparkRichTextEditorProject>

Here's an example of how you would use it:

<sparkRichTextEditor:SparkRichTextEditorToolBar id="toolbar"/>
<s:TextArea id="textAreaOne" width="100%" 
focusIn="{toolbar.textArea=textAreaOne}"/>
<s:TextArea id="textAreaTwo" width="100%" 
focusIn="{toolbar.textArea=textAreaTwo}"/>

You may have to tweak the code some to get it to do what you want, but that 
should work.

I'll keep this use case in mind when making changes to the current spark RichTextEditor. I did a quick test with it to see if I could get the current one working the way you want, and I got close, but it didn't quite behave right. Basically, I overrode the skin to have two TextAreas and then programmable swapped out the textArea part and dispatching appropriate property change events. It worked, but behaved a little quirky and sometimes threw stack traces.
Curtis Aube



On Feb 25, 2015, at 2:11 PM, Dany Dhondt <archeme...@mac.com> wrote:
Hi All,
I'm working with the new spark RichTextEditor and came up with a use case I'm 
unable to achieve:
2 or more RTE's are stacked vertically. Each of them have a formatting toolbar.
Is it possible to hide the toolbars of the individual RTE's?
is it possible to add one toolbar above all RTE's which controls the RTE that 
has focus?
Could we make the formatting toolbar a separate component?
Dany

Reply via email to