Skip to content

Commit

Permalink
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/editor/src/editor/plugins/createWithMaxBlocks.ts
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ export function createWithMaxBlocks(editorActor: EditorActor) {
const {apply} = editor
editor.apply = (operation) => {
if (editorActor.getSnapshot().context.readOnly) {
apply(operation)
return
}

Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ export function createWithPlaceholderBlock(

editor.apply = (op) => {
if (editorActor.getSnapshot().context.readOnly) {
apply(op)
return
}

1 change: 1 addition & 0 deletions packages/editor/src/editor/plugins/createWithUndoRedo.ts
Original file line number Diff line number Diff line change
@@ -115,6 +115,7 @@ export function createWithUndoRedo(
const {apply} = editor
editor.apply = (op: Operation) => {
if (editorActor.getSnapshot().context.readOnly) {
apply(op)
return
}

0 comments on commit c35f646

Please sign in to comment.