[Novice] CSS Style and TLF (span flowElement)
Hi everybody !
I read the CSSFormatResolver and the SimpleEditorWithCSS / SimpleEditorPanel... and I am totally lost ! I need some explaination ![]()
.h1{
background-color: #ffffff;
font-family: CaptionFont;
color: #999999;
font-size: 16;
}
In my appliction :
First case: The user selects characters into the textflow, choose a style in a combobox
1)This userStyle is applyed to selected characters.
I saw function in the SimpleEditorPanel :
private function performStyleOperation(newData:String,operationClass:Class):void
Does it apply the css style h1 to my span element (and display it) ?
This function is a little difficult for me.. something more simple exists?
2)Then I convert my textLayoutFormat into an xml (and here I want my styleName property into the right span element)
To give a styleName to an flow element, I just have to do
myflowElement.stylename = "h1";
and it will appear into my xml ? <span styleName="myStyle"> (without other properties like fontFamily, fontSize etc, which are already in myStyle?)
Second case: My user open a saved document. I convert a string (which contains<TextFlow>...</TextFlow>) to a TextLayoutFormat
TextConverter.export(_textFlow, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE),
and I want to applyied the styleName (so the equivalent css style) property to its owner (span element) and display it.
<span styleName="h1">Il était un petit navire</span>
I have to use also performStyleOperation after my export?
I don't understand how does it work really. Sorry for the disturbance and my english mistakes.
Thank you for your help, and have a good day
![]()
