Read-only mode

This commit is contained in:
Zef Hemel
2022-09-16 14:26:47 +02:00
parent a598b32ce1
commit b35c60ee60
8 changed files with 62 additions and 5 deletions
+6
View File
@@ -192,5 +192,11 @@ export function editorSyscalls(editor: Editor): SysCallMapping {
): string | null => {
return prompt(message, defaultValue);
},
"editor.enableReadOnlyMode": (ctx, enabled: boolean) => {
editor.viewDispatch({
type: "set-editor-ro",
enabled,
});
},
};
}