Skip to main content
May 11, 2010
Question

insert-image-from-file-system-into-text-using-the-text-layout-framework

  • May 11, 2010
  • 1 reply
  • 589 views

Hi,

I need A WYSIWYG editor, for that I am using Flex textlayout framework. My editor also supports smilies. To insert smilies I refered the example:http://www.sakri.net/blog/2009/03/23/insert-image-from-file-system-into-text-using-the-text-layout-framework/

It is inserting the smiley.

Now my requirement is instead of smilies I need to store there code like: for ":)".

So I am exporting the textflow & then trying to process the exported xml.

The problem I am facing is: I am unable to get the path of the smiley image inserted. Coz the above example inserts the image in the form of BitmapData. I also tried to get value of source attribute of flow.p.img but didn't get the path of the inserted smiley.

Please help me in getting any wayout.

Thanks in advance.

This topic has been closed for replies.

1 reply

Adobe Employee
May 11, 2010

Suggest using the FlowElement.setStyle method to attach additional information about the image to the InlineGraphicElement that gets created.  Looking at the example code in the posted link you'll need to pass that data to the imageLoadComplete method.  The InlineGraphicElement can be found by saving interactionManager.absoluteStart before the graphic is inserted and then calling textFlow.findLeaf(savedAbsoluteStart).

Hope that helps,

Richard