I'm building a rich text editor with RichEditableText. I want to be able to insert image elements on click of a button. How do I insert images into the textflow at a certain position? I need it to function as if I inserted an img tag directly into the html, so it will load the image with the url I provide. How best can I go about this?
Ok, I just discovered the flashx.textLayout.elements.InlineGraphicElement, but now how do I insert it into a certain position in the TextFlow? I'm working primarily with the spark.components.TextArea component, and I'm using SDK 18.104.22.16820. I need to insert it into the position where the caret is currently at (TextArea.selectionAnchorPosition). How do I discover at what index to insert the graphic element at?
I think you want to use the insertInlineGraphicElement() method of EditManager.
Adobe Flex SDK Team
Thanks, Gordon, that helps a lot.