Skip to content

Conversation

@legraina
Copy link

@legraina legraina commented Sep 3, 2025

I have created an eraser button to be able to erase annotations. The goal of this eraser is to remove parts of some annotations (which are erasable), especially the ink annotations. When you write, in particular on a tablet, you may want to erase parts of your writing, it’s where this eraser comes in play, like a real eraser/rubber. There is nothing added to the document it-self, as it just modifies current annotations. It replaces closed PR #20192.

  • Eraser:
    • Create an eraser editor: eraser.js
    • Abstract erase and endErase functions in editor.js, as well as an erasable field (false by default)
    • Implemented erase and endErase for ink.js
    • Implement undo/redo logic for the eraser. endErase function return a dictionnary { cmd, undo } with the right functions to use for the eraser undo and cmd.
    • Add an eraser button

@legraina legraina mentioned this pull request Sep 3, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants