Skip to content

Commit

Permalink
Prevent automatic direction changes from being added to history
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhhashemi authored Feb 14, 2025
2 parents 16ca086 + 8dc6858 commit cb9b85c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function TextDirectionPlugin({ types }: { types: string[] }) {

let modified = false;
const tr = newState.tr;
tr.setMeta('addToHistory', false)

newState.doc.descendants((node, pos) => {
if (types.includes(node.type.name)) {
Expand Down

0 comments on commit cb9b85c

Please sign in to comment.