Page 1 of 1

Howto know the new content inputed by user since last saved

Posted: Mon May 28, 2012 8:08 am
by chuqingsheng
let me explain it.

I need document revison function. I use keydown event to handle back and delete key to prevent the delete content and set the text content( only text) style with strickout.
user can input new text content . then when user delete the new text delete the new content that input by user is allowed. so I must know what the new content inputed by user.

Howto know the new content inputed by user??

Posted: Mon May 28, 2012 11:50 am
by Sergey Tkachenko
Sorry, this is not possible in a general case, only by comparing the old and the new document.
Well, you can try to use OnItemAction event to detect insertion and deletion of new items, and OnItemTextEdit to detect when the item text is modified. But I am afraid it would not be a simple work.

Posted: Tue May 29, 2012 4:41 am
by chuqingsheng
I think a solution,

after load doc, I can assign a tag value(for example "orgin") for all Item.

then user input text will not have the tag value, so I can detected the tag to distinguish them.

but ... user input text must be as new item. how to do?

Posted: Tue May 29, 2012 2:27 pm
by Sergey Tkachenko
As I said, you can detect editing changes in existing text items using OnItemTextEdit event