add keybinding for the editor

pull/1715/head
yann300 3 years ago
parent 51c689436c
commit f7c94e7344
  1. 6
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx

@ -213,6 +213,12 @@ export const EditorUI = (props: EditorUIProps) => {
(window as any).addRemixBreakpoint(e.target.position)
}
})
editor.addCommand(monacoRef.current.KeyMod.CtrlCmd | monacoRef.current.KeyCode.US_EQUAL, () => {
editor.updateOptions({ fontSize: editor.getOption(42).fontSize + 1 })
})
editor.addCommand(monacoRef.current.KeyMod.CtrlCmd | monacoRef.current.KeyCode.US_MINUS, () => {
editor.updateOptions({ fontSize: editor.getOption(42).fontSize - 1 })
})
}
function handleEditorWillMount (monaco) {

Loading…
Cancel
Save