ToastUI Editor

Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.

README

TOAST UI Editor


GFM Markdown and WYSIWYG Editor - Productive and Extensible

github release version npm version license PRs welcome code with hearth by NHN Cloud



🚩 Table of Contents




📦 Packages


TOAST UI Editor


NameDescription
------
[`@toast-ui/editor`](https://github.com/nhn/tui.editor/tree/master/apps/editor)Plain

TOAST UI Editor's Wrappers


NameDescription
------
[`@toast-ui/react-editor`](https://github.com/nhn/tui.editor/tree/master/apps/react-editor)[React](https://reactjs.org/)
[`@toast-ui/vue-editor`](https://github.com/nhn/tui.editor/tree/master/apps/vue-editor)[Vue](https://vuejs.org/)

TOAST UI Editor's Plugins


NameDescription
------
[`@toast-ui/editor-plugin-chart`](https://github.com/nhn/tui.editor/tree/master/plugins/chart)Plugin
[`@toast-ui/editor-plugin-code-syntax-highlight`](https://github.com/nhn/tui.editor/tree/master/plugins/code-syntax-highlight)Plugin
[`@toast-ui/editor-plugin-color-syntax`](https://github.com/nhn/tui.editor/tree/master/plugins/color-syntax)Plugin
[`@toast-ui/editor-plugin-table-merged-cell`](https://github.com/nhn/tui.editor/tree/master/plugins/table-merged-cell)Plugin
[`@toast-ui/editor-plugin-uml`](https://github.com/nhn/tui.editor/tree/master/plugins/uml)Plugin


🤖 Why TOAST UI Editor?


TOAST UI Editor provides Markdown mode and WYSIWYG mode. Depending on the type of use you want like production of Markdown or maybe to just edit the Markdown. The TOAST UI Editor can be helpful for both the usage. It offers Markdown mode and WYSIWYG mode, which can be switched any point in time.

Productive Markdown Mode


markdown

CommonMark + GFM Specifications

Today CommonMark is the de-facto Markdown standard. GFM (GitHub Flavored Markdown) is another popular specification based on CommonMark - maintained by GitHub, which is the Markdown mostly used. TOAST UI Editor follows both [CommonMark](http://commonmark.org/) and [GFM](https://github.github.com/gfm/) specifications. Write documents with ease using productive tools provided by TOAST UI Editor and you can easily open the produced document wherever the specifications are supported.

Live Preview : Edit Markdown while keeping an eye on the rendered HTML. Your edits will be applied immediately.
Scroll Sync : Synchronous scrolling between Markdown and Preview. You don't need to scroll through each one separately.
Syntax Highlight : You can check broken Markdown syntax immediately.

Easy WYSIWYG Mode


wysiwyg

Table : Through the context menu of the table, you can add or delete columns or rows of the table, and you can also arrange text in cells.
Custom Block Editor : The custom block area can be edited through the internal editor.
Copy and Paste : Paste anything from browser, screenshot, excel, powerpoint, etc.

UI

Toolbar : Through the toolbar, you can style or add elements to the document you are editing.
UI

Dark Theme : You can use the dark theme.
UI

Use of Various Extended Functions - Plugins


plugin

CommonMark and GFM are great, but we often need more abstraction. The TOAST UI Editor comes with powerful Plugins in compliance with the Markdown syntax.

Five basic plugins are provided as follows, and can be downloaded and used with npm.

[chart](https://github.com/nhn/tui.editor/tree/master/plugins/chart) : A code block marked as a 'chart' will render TOAST UI Chart.
[code-syntax-highlight](https://github.com/nhn/tui.editor/tree/master/plugins/code-syntax-highlight) : Highlight the code block area corresponding to the language provided by Prism.js.
[color-syntax](https://github.com/nhn/tui.editor/tree/master/plugins/color-syntax) :
Using TOAST UI ColorPicker, you can change the color of the editing text with the GUI.
[table-merged-cell](https://github.com/nhn/tui.editor/tree/master/plugins/table-merged-cell) :
You can merge columns of the table header and body area.
[uml](https://github.com/nhn/tui.editor/tree/master/plugins/uml) : A code block marked as an 'uml' will render UML diagrams.

🎨 Features


Viewer : Supports a mode to display only markdown data without an editing area.
Internationalization (i18n) : Supports English, Dutch, Korean, Japanese, Chinese, Spanish, German, Russian, French, Ukrainian, Turkish, Finnish, Czech, Arabic, Polish, Galician, Swedish, Italian, Norwegian, Croatian + language and you can extend.
Widget : This feature allows you to configure the rules that replaces the string matching to a specificRegExp with the widget node.
Custom Block : Nodes not supported by Markdown can be defined through custom block. You can display the node what you want through writing the parsing logic with custom block.

🐾 Examples



Here are more examples and play with TOAST UI Editor!


🌏 Browser Support


| Chrome Chrome | IE Internet Explorer | Edge Edge | Safari Safari | Firefox Firefox |
| :---------: | :---------: | :---------: | :---------: | :---------: |
| Yes | 11+ | Yes | Yes | Yes |


🔧 Pull Request Steps


TOAST UI products are open source, so you can create a pull request(PR) after you fix issues. Run npm scripts and develop yourself with the following process.

Setup


Fork main branch into your personal repository. Clone it to local computer. Install node modules. Before starting development, you should check if there are any errors.

  1. ```sh
  2. $ git clone https://github.com/{your-personal-repo}/tui.editor.git
  3. $ npm install
  4. $ npm run build toastmark
  5. $ npm run test editor
  6. ```

TOAST UI Editor uses npm workspace, so you need to set the environment based on npm7. If subversion is used, dependencies must be installed by moving direct paths per package.


Develop


You can see your code reflected as soon as you save the code by running a server. Don't miss adding test cases and then make green rights.

Run snowpack-dev-server

snowpack allows you to run a development server without bundling.

  1. ``` sh
  2. $ npm run serve editor
  3. ```

Run webpack-dev-server

If testing of legacy browsers is required, the development server can still be run using a webpack.

  1. ``` sh
  2. $ npm run serve:ie editor
  3. ```

Run test


  1. ``` sh
  2. $ npm test editor
  3. ```

Pull Request


Before uploading your PR, run test one last time to check if there are any errors. If it has no errors, commit and then push it!

For more information on PR's steps, please see links in the Contributing section.

💬 Contributing




🍞 TOAST UI Family




🚀 Used By




📜 License


This software is licensed under the MIT © NHN Cloud.