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

Maintain history when switching mode #504

Merged
merged 14 commits into from
Nov 26, 2024
Merged

Maintain history when switching mode #504

merged 14 commits into from
Nov 26, 2024

Conversation

josdejong
Copy link
Owner

@josdejong josdejong commented Nov 25, 2024

Currently, when switching mode, you lose all your history. This makes it an unsafe action.

This PR lets the editor maintain history when switching modes:

  • Creates a custom history for the codemirror editor (text mode), controlled by TextMode
  • Moves the history to JSONEditorRoot, maintaining a single history for all three modes.
  • Adds switching mode as a new history item.
  • Fixes not being able to change property selection via method updateProps.

@josdejong josdejong merged commit b5f11ca into main Nov 26, 2024
3 checks passed
@josdejong josdejong deleted the feat/unified-history branch November 26, 2024 12:07
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.

1 participant