Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Slate | 27,120 | 3,499 | 923 | 7 days ago | 686 | August 23, 2022 | 595 | mit | TypeScript | |
A completely customizable framework for building rich text editors. (Currently in beta.) | ||||||||||
Tiptap | 19,227 | 136 | 9 hours ago | 198 | September 20, 2022 | 238 | mit | TypeScript | ||
The headless editor framework for web artisans. | ||||||||||
Awesome Lowcode | 11,721 | 2 days ago | 4 | cc0-1.0 | ||||||
国内低代码平台从业者交流 | ||||||||||
Oni | 11,477 | 1 | 3 years ago | 6 | April 02, 2017 | 518 | mit | TypeScript | ||
Oni: Modern Modal Editing - powered by Neovim | ||||||||||
React Page | 9,186 | 18 | 20 days ago | 304 | September 21, 2022 | 8 | mit | TypeScript | ||
Next-gen, highly customizable content editor for the browser - based on React and written in TypeScript. WYSIWYG on steroids. | ||||||||||
Tinacms | 8,863 | 5 | 61 | 4 hours ago | 105 | September 21, 2022 | 87 | other | TypeScript | |
The Markdown CMS | ||||||||||
H5 Dooring | 7,298 | 3 months ago | 29 | gpl-3.0 | JavaScript | |||||
H5 Page Maker, H5 Editor, LowCode. Make H5 as easy as building blocks. | 让H5制作像搭积木一样简单, 轻松搭建H5页面, H5网站, PC端网站,LowCode平台. | ||||||||||
Vditor | 6,344 | 11 | 17 | 12 hours ago | 310 | August 04, 2022 | 80 | mit | TypeScript | |
♏ 一款浏览器端的 Markdown 编辑器,支持所见即所得(富文本)、即时渲染(类似 Typora)和分屏预览模式。An In-browser Markdown editor, support WYSIWYG (Rich Text), Instant Rendering (Typora-like) and Split View modes. | ||||||||||
React Data Grid | 6,068 | 441 | 206 | 5 hours ago | 1,017 | September 16, 2022 | 157 | other | TypeScript | |
Feature-rich and customizable data grid React component | ||||||||||
React Draft Wysiwyg | 6,031 | 786 | 337 | 2 months ago | 131 | July 17, 2022 | 695 | mit | JavaScript | |
A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg |
Monaco Editor component for React. demo @jaywcjlove.github.io/react-monacoeditor/
npm install @uiw/react-monacoeditor --save
import React from 'react';
import MonacoEditor from '@uiw/react-monacoeditor';
<MonacoEditor
language="html"
value="<h1>I ♥ react-monacoeditor</h1>"
options={{
theme: 'vs-dark',
}}
/>
import React from 'react';
import { render } from 'react-dom';
import MonacoEditor from '@uiw/react-monacoeditor';
const code = `import React, { PureComponent } from 'react';
import MonacoEditor from '@uiw/react-monacoeditor';
export default class App extends PureComponent {
render() {
return (
<MonacoEditor
language="html"
value="<h1>I ♥ react-codemirror2</h1>"
options={{
selectOnLineNumbers: true,
roundedSelection: false,
cursorStyle: 'line',
automaticLayout: false,
theme: 'vs-dark',
}}
/>
);
}
}
`;
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
code: '// type your code...',
}
}
editorDidMount(editor, monaco) {
console.log('editorDidMount', editor, monaco);
editor.focus();
}
onChange(newValue, e) {
console.log('onChange', newValue, e);
}
render() {
const options = {
selectOnLineNumbers: true,
roundedSelection: false,
readOnly: false,
cursorStyle: 'line',
automaticLayout: false,
theme: 'vs-dark',
scrollbar: {
// Subtle shadows to the left & top. Defaults to true.
useShadows: false,
// Render vertical arrows. Defaults to false.
verticalHasArrows: true,
// Render horizontal arrows. Defaults to false.
horizontalHasArrows: true,
// Render vertical scrollbar.
// Accepted values: 'auto', 'visible', 'hidden'.
// Defaults to 'auto'
vertical: 'visible',
// Render horizontal scrollbar.
// Accepted values: 'auto', 'visible', 'hidden'.
// Defaults to 'auto'
horizontal: 'visible',
verticalScrollbarSize: 17,
horizontalScrollbarSize: 17,
arrowSize: 30,
},
};
return (
<MonacoEditor
height="500px"
language="javascript"
editorDidMount={this.editorDidMount.bind(this)}
onChange={this.onChange.bind(this)}
value={code}
options={options}
/>
);
}
}
render(
<App />,
document.getElementById('root')
);
Add the Monaco Editor Webpack Loader Plugin monaco-editor-webpack-plugin
to your webpack.config.js
:
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
module.exports = {
plugins: [
new MonacoWebpackPlugin()
]
};
If you specify value
property, the component behaves in controlled mode.
Otherwise, it behaves in uncontrolled mode.
width
width of editor. Defaults to 100%
.height
height of editor. Defaults to 100%
.value
value of the auto created model in the editor.defaultValue
the initial value of the auto created model in the editor.language
the initial language of the auto created model in the editor.theme
the theme of the editor vs
, vs-dark
, hc-black
options
refer to Monaco interface IEditorConstructionOptions.editorDidMount(editor, monaco)
an event emitted when the editor has been mounted (similar to componentDidMount
of React).onChange(newValue, event)
an event emitted when the content of the current model has changed.autoComplete?: (model: monaco.editor.ITextModel, position: monaco.Position) => languages.CompletionItem[];
User provided extension function provider for auto-complete. #47
Refer to Monaco interface IEditor.
As always, thanks to our amazing contributors!
Made with github-action-contributors.
Licensed under the MIT License.