Skip to main content
Known Participant
April 21, 2009
Answered

Problem with operations

  • April 21, 2009
  • 1 reply
  • 614 views

For my current project I need to know when a paragraph is removed. I am using the FlowOperationEvent and if the operation is a DeleteTextOperation I determine if there occured the deletion of a paragraph. The problem with this approach is that if the user selects some text and inserts any character the operation given to the event is the InsertTextOperation. Shouldn't there be two separate events for the deletion and the insertion of the new character? Is there any better way to determine if something has been deleted?

Thanks in advance.

This topic has been closed for replies.
Correct answer Abhi.G.

Hi,

You could look at the absoluteStart and absoluteEnd values for the InsertTextOperation. If the two are not equal, some text has been deleted.

Note that there are other operations that may involve deletion of text: InsertInlineGraphicOperation, CutOperation.

- Abhishek

(Adobe Systems Inc.)

1 reply

Abhi.G.Correct answer
Participating Frequently
April 21, 2009

Hi,

You could look at the absoluteStart and absoluteEnd values for the InsertTextOperation. If the two are not equal, some text has been deleted.

Note that there are other operations that may involve deletion of text: InsertInlineGraphicOperation, CutOperation.

- Abhishek

(Adobe Systems Inc.)