GFM Markdown WYSIWYG Editor - Productive and Extensible
- toast-ui.vue-editor: Vue wrapper component is powered by NHN Entertainment.
- toast-ui.react-editor: React wrapper component is powered by NHN Entertainment.
- ember-tui-editor: Ember wrapper component by @evocount. Thanks for their effort.
🚩 Table of Contents
- Collect statistics on the use of open source
- Browser Support
- Standard and Extensible
- TOAST UI Family
- Used By
Collect statistics on the use of open source
TOAST UI Editor applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI Editor is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, use the following
usageStatistics options when creating editor.
var options =...usageStatistics: falsevar editor = options;
tui-code-snippet.js (v1.4.0 or later) and then immediately write the options as follows:
tuiusageStatistics = false;
🌏 Browser Support
Standard and Extensible
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 respects both CommonMark and 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.
CommonMark and GFM are great, but we often need more abstraction. The TOAST UI Editor comes with powerful Extensions in compliance with the Markdown syntax. You also get the flexibility to develop your own extensions using simple APIs.
Here are some of the extensions you can start with:
- Color picker: ColorPicker provides an easy way to color text with a GUI tool box
- Chart code block: A Code block marked as a 'chart' will render charts
- UML code block: A Code block marked as an 'uml' will render UML diagrams
- Table merge: You can merge columns and rows in tables
To learn more about Extensions check the Using Extension
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
- Live Preview: Edit Markdown while keeping an eye on the rendered HTML. Your edits will be applied immediately
- Scrolling Sync: Synchronous scrolling between Markdown and Preview. You don't need to scroll through each one separately
- Auto indent: The cursor will always be where you want it to be
- Syntax highlight: You can check broken Markdown syntax immediately
Easy WYSIWYG mode
- Copy and paste: Paste anything from browser, screenshot, excel, powerpoint, etc.
- Codeblock editor: Highlight 170+ languages with full size code editor
- Table: Hate the Markdown table? You can do everything with a mouse
- i18n: English, Dutch, Korean, Japanese, Chinese, Spanish, German, Russian, French, Ukrainian, Turkish, Finnish, Czech, Arabic, Polish + language you extend.
- Viewer: Renders Markdown content with extensions
npm install --save tui-editor
bower install --save tui-editor
Via Contents Delivery Network (CDN)
TOAST UI products are available over the CDN powered by TOAST Cloud.
You can use the CDN as below.
If you want to use a specific version, use the tag name instead of
latest in the url's path.
The CDN directory has the following structure.
tui-editor/ ├─ latest/ │ ├─ tui-editor-Editor.js │ ├─ tui-editor-Editor.min.js │ └─ ... ├─ v1.1.0/ │ ├─ ...
The code provided underneath is for npm + bundler. If you are using bower please see Getting started with bower.
<div></div> where you want TOAST UI Editor rendered.
Add dependencies & initialize Editor class with given element to make an Editor.
// deps for editor; // codemirror; // editor ui; // editor content; // code block highlightvar Editor = ;...var editor =el: documentinitialEditType: 'markdown'previewStyle: 'vertical'height: '300px';
or you can use jquery plugin.
or if using the CDN
var editor =el: documentinitialEditType: 'markdown'previewStyle: 'vertical'height: '300px';
- height: Height in string or auto ex)
- initialValue: Initial value. Set Markdown string
- initialEditType: Initial type to show
- previewType: Preview style of Markdown mode
- usageStatistics: Let us know the hostname. We want to learn from you how you are using the editor. You are free to disable it.
Find out more options here
TOAST UI Editor provides a Viewer in case you want to show Markdown content without loading the editor. The Viewer is much lighter than the editor.
// deps for viewer.; // editor content; // code block highlightvar Viewer = ;...var editor =el: documentheight: '500px'initialValue: '# content to be rendered';...
Be careful not to load both the editor and the viewer at the same time because the editor already contains the viewer function, you can initialize editor Editor.factory() and set the
viewer option to value
true in order to make the editor a viewer. You can also call getHTML() to render the HTML.
var Editor = ;...var editor = Editor;...
TOAST UI Editor respects CommonMark and GFM. So any Markdown renderer including markdownit can handle the content made using TOAST UI Editor. You can also use any of these renderer in place of TOAST UI Editor Viewer.
- editor basic
- viewer basic
- jQuery plugin
- uml extension
- chart extension
- writing extension
- all extensions