Howto know the new content inputed by user since last saved

General TRichView support forum. Please post your questions here
Post Reply
chuqingsheng
Posts: 38
Joined: Sat Nov 06, 2010 5:12 am

Howto know the new content inputed by user since last saved

Post 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??
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
chuqingsheng
Posts: 38
Joined: Sat Nov 06, 2010 5:12 am

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

As I said, you can detect editing changes in existing text items using OnItemTextEdit event
Post Reply