Skip to main content
Known Participant
April 6, 2009
Question

IEditManager.insertInlineGraphic question

  • April 6, 2009
  • 1 reply
  • 1365 views

Hi there,

when calling the IEditManager.insertInlineGraphic() method there doesn't seem to be a clear way of getting a reference to the InlineGraphicElement that was added. Am I missing something or would it perhaps make sense to change the method in such a way that it returns a reference to the new InlineGraphicElement?

So the signature would become like this:


IEditManager.insertInlineGraphic(source:Object,width:Object,height:Object,operationState:SelectionState = null):InlineGraphicElement;

Any thoughts anyone?

thanks in advance,

Roland

This topic has been closed for replies.

1 reply

Adobe Employee
April 7, 2009

For now, you can get the inline graphic by taking the absolute position where the graphic was inserted, and doing:

var leaf:FlowLeafElement = textFlow.findLeaf(absolutePosition);

This will return the InlineGraphicElement.

Can you tell me what you need to do with the inline graphic after its inserted? It's possible there is an easier solution for what you are doing.

Thanks!

- robin

mech-headAuthor
Known Participant
April 8, 2009

Hey Robin,

what I need to do is simple, I need to give the inserted image an ID. Your solution does indeed the trick of retrieving the image but sortof feels 'hacky', or am I being over-sensitive?

thanks a lot for your time,

Roland

Participating Frequently
November 4, 2009

This was an old thread I just stumbled on, but there are many things I would like to be able to do with an inserted image that I am researching.  Such as putting visual controls on it that could be used to resize the inserted graphic, as well as dragging it around to reposition it.