1
0
silverbullet/web/cm_plugins/readonly.ts

8 lines
167 B
TypeScript
Raw Normal View History

2023-01-16 10:28:59 +00:00
import { EditorState } from "../deps.ts";
export function readonlyMode() {
return EditorState.changeFilter.of((tr): boolean => {
return !tr.docChanged;
});
}