nytimes / ice

track changes with javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delete not consistant

jamienk opened this issue · comments

Backspace works differently from select and delete.

  1. Enter some SAMPLE text on the DEMO page http://nytimes.github.io/ice/demo/

  2. Click somewhere else, and type the backspace key -- this correctly adds a strike-through on the other user's text (This also works if you select and hit delete or select and type over)

  3. Select some of your SAMPLE text and hit delete -- this also appropriately adds strike-through

  4. Click into your SAMPLE text and hit backspace. Note that your text is deleted, not struck through. This should work as 2 above: deleting your own text (though select & delete, select and type, or backspace) should add strike-through. Backspace doesn't work on your own text...

I see now that this was changed in the dev branch. Now, a user can delete their own text and have it "deleted" as opposed to being marked for deletion. For my project, I'd like to preserve deletions that a user makes on their own text. How would I go about doing this? Can we have an option? Can I write a plugin? Or (last choice) should I modify the code?

And pointers would be appreciated!

-Jamie

I hate to recommend this, but you'll have to modify your own version. It's not on our roadmap to support that kind of behavior.

Some hints: look at _addNodeTracking in ice.js, there are a couple of places where _currentUserIceNode() is checked. You can try to remove them, or insert your own logic in those locations.

Let me know if you have any other questions. Good luck.

Thanks for the tip