react-hooks-codemirror icon indicating copy to clipboard operation
react-hooks-codemirror copied to clipboard

A nice neat React component wrapper for CodeMirror

react-hooks-codemirror

A nice little React component for CodeMirror

Usage

let options = {
  lineNumbers: true,
  highlightFormatting: true,
  tabSize: 2,
  theme: "dracula"
};

let language = "javascript";

// If you want to have a custom theme, make this true,
// and include your CSS wherever this component is used.
// You can pick a default theme from here:
// https://codemirror.net/demo/theme.html
let customTheme = false;

<CodeMirrorReact options={options} language={language} customTheme />;