new ToastUIEditor(options)editor.jsline 138
ToastUI Editor
PARAMETERS
Name Type Description options
object
Option object
PROPERTIES
Name Type Description el
HTMLElement
container element
height
string = '300px'
Editor's height style value. Height is applied as border-box ex) '300px', '100%', 'auto'
minHeight
string = '200px'
Editor's min-height style value in pixel ex) '300px'
initialValue
[ string ]
Editor's initial value
previewStyle
[ string ]
Markdown editor's preview style (tab, vertical)
initialEditType
[ string ]
Initial editor type (markdown, wysiwyg)
events
[ Array ]
eventlist Event list
PROPERTIES
Name Type Description load
function
It would be emitted when editor fully load
change
function
It would be emitted when content changed
stateChange
function
It would be emitted when format change by cursor position
focus
function
It would be emitted when editor get focus
blur
function
It would be emitted when editor loose focus
hooks
[ Array ]
Hook list
PROPERTIES
Name Type Description previewBeforeHook
function
Submit preview to hook URL before preview be shown
addImageBlobHook
addImageBlobHook
hook for image upload.
language
string = 'en_US'
language
useCommandShortcut
boolean = true
whether use keyboard shortcuts to perform commands
useDefaultHTMLSanitizer
boolean = true
use default htmlSanitizer
codeBlockLanguages
[ Array ]
supported code block languages to be listed. default is what highlight.js supports
usageStatistics
boolean = true
send hostname to google analytics
toolbarItems
[ Array ]
toolbar items.
hideModeSwitch
boolean = false
hide mode switch tab bar
exts
[ Array ]
extensions
customConvertor
[ object ]
convertor extention
placeholder
[ string ]
The placeholder text of the editable element.
previewDelayTime
[ string ]
the delay time for rendering preview
linkAttribute
[ object ]
Attributes of anchor element that shold be rel, target, contenteditable, hreflang, type
Resizable