This issue recommends an open source browser-based code editor, monaco-editor.
Monaco Editor is a browser-side code editor that supports C, Java, TypeScript, JavaScript and other programming languages, and can be used as a source code editor embedded in Web applications. Monaco supports basic syntax coloring and a difference editor.
Installation use
git clone https://github.com/microsoft/monaco-editor.git
cd samples
npm install .
npm run simpleserver
Access localhost:8888 after successful installation.
Monaco function
- Keyboard navigation
The Monaco editor provides an exhaustive list of commands in the command panel (F1 or Alt+F1 on Internet Explorer), so the editor can be used without the use of a mouse, and the command panel can also be invoked from the editor’s context menu.
- High contrast
In the Edge browser, the editor will automatically adjust the high contrast theme and color selected in Windows:
Use the “Switch High Contrast theme” feature in the command panel for other browsers:
- TAB capture
By default, pressing Tab in the editable editor inserts the Tab character (or space, depending on the indent setting) and does not navigate to the next focused element on the page. Toggle Tab capture using Ctrl+M on Windows and Linux and Ctrl+Shift+M on OSX, with the subsequent Tab key moving the focus out of the editor.
- Auxiliary function Help
Press Alt+F1 or Ctrl+F1 in your browser to trigger the “Show Accessibility Help” dialog box in the editor to find the current position in the editor and check the status of various accessibility options.
You can read more on your own.