Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SuperEditor] - Undo/redo can now be disabled (they are disabled by default) (Resolves #2214) #2215

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

matthew-carroll
Copy link
Contributor

[SuperEditor] - Undo/redo can now be disabled (they are disabled by default) (Resolves #2214)

The Editor now has a property called isHistoryEnabled. That property is respected inside the Editor - undo() and redo() bail if it's false. Also, the locations that would otherwise add to the history only do that when the property is true.

I made the property a constant on each Editor instance because attempting to change that value over time seems more likely to create bugs than to enable desired behavior.

I also updated the test configuration system to take a value for isHistoryEnabled.

Copy link
Collaborator

@angelosilvestre angelosilvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matthew-carroll matthew-carroll merged commit d3f54ab into main Aug 5, 2024
12 checks passed
@matthew-carroll matthew-carroll deleted the 2214_let-users-disable-undo-redo branch August 5, 2024 18:53
github-actions bot pushed a commit that referenced this pull request Aug 5, 2024
matthew-carroll added a commit that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SuperEditor] - Make it possible to disable undo/redo
2 participants