Add method disableHistory to disable history on the given transaction #7

Closed
percy507 wants to merge 1 commit from master into master
percy507 commented 2022-01-29 19:38:17 +01:00 (Migrated from github.com)

Hi marijnh,

I am building a codeblock node based on CodeMirror and ProseMirror.

Similar to the official codemirror example, a code editor in prosemirror. The difference is that I am using the codemirror6 and the code editor have tabs.

When change the tab, I need to change the content of codeblock node dynamicly by dispatching tr.replaceWith. Then the change will be stored in history which is unwanted.

So I make this PR.

2022-01-30 02 34 44

Hi marijnh, I am building a codeblock node based on CodeMirror and ProseMirror. Similar to the official codemirror example, a code editor in prosemirror. The difference is that I am using the codemirror6 and the code editor have tabs. When change the tab, I need to change the content of codeblock node dynamicly by dispatching `tr.replaceWith`. Then the change will be stored in history which is unwanted. So I make this PR. ![2022-01-30 02 34 44](https://user-images.githubusercontent.com/18365078/151673249-b15533bb-3e86-4d5c-897f-bc6125893e0f.gif)
marijnh commented 2022-01-30 13:31:21 +01:00 (Migrated from github.com)

This looks like it will just corrupt the history (by making the changes in it no longer align with the current document).

This looks like it will just corrupt the history (by making the changes in it no longer align with the current document).
percy507 commented 2022-01-31 08:43:10 +01:00 (Migrated from github.com)

You are right. I think I should try another interaction.

You are right. I think I should try another interaction.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-history!7
No description provided.