Nicer read-only mode
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { EditorState } from "../deps.ts";
|
||||
|
||||
export function readonlyMode() {
|
||||
return EditorState.changeFilter.of((tr): boolean => {
|
||||
return !tr.docChanged;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user