Problem with SelectionState, plase help
Hi
I've tried create list and convert it to plain text at runtime.
With creating text evrething is ok
var tf:TextLayoutFormat = editor.getFormatOfRange(null, editor.selectionAnchorPosition, editor.selectionActivePosition);
var selState : SelectionState = new SelectionState(editor.textFlow, editor.selectionAnchorPosition, editor.selectionActivePosition);
var listFormar : TextLayoutFormat = tf;
listFormar.listStyleType = ListStyleType.DISC;
listFormar.listStylePosition = ListStylePosition.OUTSIDE;
var operation : CreateListOperation = new CreateListOperation(selState, null, listFormar);
operation.doOperation();
With this evtething is ok - list was created.
But when I've tried to convert selected text from list to plain text I have problem. I've selected list but SelectedState return all textFlow from editor (RichEditableText), and I can't receive root list element. Please help to select list in textFlow.
var selState : SelectionState = new SelectionState(editor.textFlow, editor.selectionAnchorPosition, editor.selectionActivePosition);
