Monaco Editor Nginx

Nginx language plugin for the Monaco Editor. It provides the following features when editing Nginx config files:

  • Syntax highlighting

Quick Start

npm install monaco-editor-nginx

Open in CodeSandbox Open in Github gh-pages

import MonacoEditor from "@uiw/react-monacoeditor";
import "monaco-editor-nginx";

<MonacoEditor
  theme="nginx-theme"
  language="nginx"
  value={nginxStr}
  height="100vh"
  options={{
    theme: "vs-dark",
  }}
/>;

or, Integrating the ESM version of the Monaco Editor

import * as monaco from "monaco-editor";
import "monaco-editor-nginx";

monaco.editor.create(document.getElementById("container"), {
  theme: "nginx-theme",
  value: "nginx code.....",
  language: "nginx",
});

Development

Runs the project in development mode.

# Step 1, run first, listen to the component compile and output the .js file
# listen for compilation output type .d.ts file
npm run watch
# Step 2, development mode, listen to compile preview website instance
npm run start

Builds the app for production to the build folder.

npm run build

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

Contributors

As always, thanks to our amazing contributors!

Made with github-action-contributors.

License

Licensed under the MIT License.

© Cyber-Life.cn Studio all right reserved,powered by Gitbook该文件修订时间: 2022-04-29 19:01:43

results matching ""

    No results matching ""