steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
12.21k stars 1.02k forks source link

feat: Track Changes with Red and Green Highlights #300

Closed magedhelmy1 closed 6 months ago

magedhelmy1 commented 6 months ago

Describe the feature you'd like to request

I'd like to request a feature that allows us to track changes in our text editor. This feature should show deleted text with a red strikethrough and new additions in green. This will make it easier to see what's been changed without track changes currently available.

Describe the solution you'd like to see

I would like to see a solution where the text editor is equipped with a change tracking system that visually represents edits made to a document. This system should:

  1. Highlight all deleted text with a red strikethrough, clearly indicating which parts of the text have been removed.
  2. Highlight all newly added text in green, making it easy to spot new insertions.
  3. Ensure that these highlights are visible in real-time as changes are made to the document.
  4. Allow users to toggle the change tracking feature on and off as needed.
  5. Provide an option to accept or reject changes individually or collectively, to finalize the editing process.

This solution should be intuitive and not require extensive training to use, seamlessly integrating into the existing interface of the text editor. The goal is to enhance the collaborative editing experience by making changes transparent and easy to follow for all users involved.

Additional information

No response

andrewdoro commented 6 months ago

Hey thanks for the suggestion, but currently I don't see this as a high priority task for myself. It requires a lot of low code effort to create a plugin that works with Prosemirror internals. (and they are not pretty). 😭😭😭

I've also seen here some solutions implemented using Prosemirror or Tiptap. Feel free to contribute with a PR if you find something helpful. https://discuss.prosemirror.net/t/implement-new-track-changes-in-current-document-just-lice-office-review-mode/4890 https://github.com/chenyuncai/tiptap-track-change-extension https://discuss.yjs.dev/t/live-tracking-track-changes/293/15 https://demos.yjs.dev/prosemirror-versions/prosemirror-versions.html

I'll just convert this issue to a discussion until there is more traction or someone wants to contribute. Also if this is picked up by someone I only see a few ways in which novel can help with this: