GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - web-frame/tui.editor: šŸžšŸ“ Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

1,705 Commits
1,705 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
examples
examples
 
 
src
src
 
 
test
test
 
 
.babelrc
.babelrc
 
 
.bowerrc
.bowerrc
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc
.eslintrc
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bower.json
bower.json
 
 
jsdoc.conf.js
jsdoc.conf.js
 
 
karma.conf.js
karma.conf.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
webpack.config.js
webpack.config.js
 
 

Repository files navigation

logo

GFM Markdown WYSIWYG Editor - Productive and Extensible

github version npm version bower version license PRs welcome code with hearth by NHN ent.

🚩 Table of Contents

  • Browser Support
  • Standard and Extensible
    • CommonMark + GFM Specifications
    • Powerful Extensions
  • Features
    • Productive Markdown mode
    • Easy WYSIWYG mode
    • And more
  • Install
    • using npm
    • using bower
    • Via Contents Delivery Network (CDN)
    • Download
  • Usage
    • Editor
      • HTML
      • javascript
      • options
    • Viewer
  • Docs
  • Examples
  • Contributing
  • TOAST UI Family
  • Used By
  • License

šŸŒ Browser Support

Chrome Chrome IE Internet Explorer Edge Edge Safari Safari Firefox Firefox
Yes 10+ Yes Yes Yes

Standard and Extensible

standard and extensible image

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.

Powerful Extensions

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

šŸŽØ Features

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 image

  • 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

wysiwyg image

  • 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

And more

  • i18n: English, Dutch, Korean, Japanese, Chinese, Spanish, German, Russian, French, Ukrainian, Turkish + language you extend.
  • Viewer: Renders Markdown content with extensions

šŸ’¾ Install

using npm

npm install --save tui-editor

using bower

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.

<script src="https://uicdn.toast.com/tui-editor/latest/tui-editor-Editor.js"></script>

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/
│  ā”œā”€ ...

download

  • Download bundle files from dist directory
  • Download all sources for each version from release

šŸ”Ø Usage

The code provided underneath is for npm + bundler. If you are using bower please see Getting started with bower.

Editor

HTML

Place a <div></div> where you want TOAST UI Editor rendered.

<body>
...
<div id="editSection"></div>
...
</body>

javascript

Add dependencies & initialize Editor class with given element to make an Editor.

// deps for editor
require('codemirror/lib/codemirror.css') // codemirror
require('tui-editor/dist/tui-editor.css'); // editor ui
require('tui-editor/dist/tui-editor-contents.css'); // editor content
require('highlight.js/styles/github.css'); // code block highlight

var Editor = require('tui-editor');
...
var editor = new Editor({
    el: document.querySelector('#editSection'),
    initialEditType: 'markdown',
    previewStyle: 'vertical',
    height: '300px'
});

or you can use jquery plugin.

$('#editSection').tuiEditor({
    initialEditType: 'markdown',
    previewStyle: 'vertical',
    height: '300px'
});

options

  • height: Height in string or auto ex) 300px | auto
  • initialValue: Initial value. Set Markdown string
  • initialEditType: Initial type to show markdown | wysiwyg
  • previewType: Preview style of Markdown mode tab | vertical
  • usageStatistics: Let us know the hostname. We want to learn from you how you are using the editor. You are free to disable it. true | false

Find out more options here

Viewer

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.
require('tui-editor/dist/tui-editor-contents.css'); // editor content
require('highlight.js/styles/github.css'); // code block highlight

var Viewer = require('tui-editor/dist/tui-editor-Viewer');
...
var editor = new Viewer({
    el: document.querySelector('#viewerSection'),
    height: '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 = require('tui-editor');
...
var editor = Editor.factory({
    el: document.querySelector('#viewerSection'),
    viewer: true,
    height: '500px',
    initialValue: '# content to be rendered'
});
...

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.

šŸ“™ Docs

  • Getting started
  • Getting started with bower
  • Writing your own extension
  • APIs

🐾 Examples

  • editor basic
  • viewer basic
  • jQuery plugin
  • uml extension
  • chart extension
  • writing extension
  • all extensions

šŸ’¬ Contributing

  • Code of Conduct
  • Contributing guideline
  • Commit convention

šŸž TOAST UI Family

  • TOAST UI Grid
  • TOAST UI Chart
  • TOAST UI Calendar
  • TOAST UI Components

šŸš€ Used By

  • TOAST Dooray! - Collaboration Service (Project, Messenger, Mail)

šŸ“œ License

This software is licensed under the MIT Ā© NHN Ent.

About

šŸžšŸ“ Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.

ui.toast.com/tui-editor

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.