npm i @monaco-editor/react
App.jsx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import React from 'react'; import './style.css'; import Editor from '@monaco-editor/react'; export default function App() { return ( <div> <h1>Hello StackBlitz!</h1> <p>Start editing in Monaco to see some magic happen :)</p> <Editor theme="vs-dark" height="50vh" defaultLanguage="html" defaultValue="<!-- Create Content -->" /> </div> ); } |
FULL SOURCE CODE