Nicer read-only mode

This commit is contained in:
Zef Hemel
2023-01-16 11:28:59 +01:00
parent 882f157cf1
commit fd8645c157
4 changed files with 33 additions and 23 deletions
+7
View File
@@ -0,0 +1,7 @@
import { EditorState } from "../deps.ts";
export function readonlyMode() {
return EditorState.changeFilter.of((tr): boolean => {
return !tr.docChanged;
});
}