logo

/repo|v1.4.9

Class

new ToastUIEditorViewer(options)viewer.jsline 35

Class ToastUIEditorViewer

PARAMETERS
NameTypeDescription

options

object

Option object

PROPERTIES
NameTypeDescription

el

HTMLElement

container element

initialValue

string

Editor's initial value

events

object

eventlist Event list

PROPERTIES
NameTypeDescription

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

object

Hook list

PROPERTIES
NameTypeDescription

previewBeforeHook

function

Submit preview to hook URL before preview be shown

exts

[ Array ]

extensions

Static Properties

codeBlockManager:

CodeBlockManager

viewer.jsline 216

CodeBlockManager instance

isViewer:

boolean

viewer.jsline 203

check whther is viewer

markdownit:

MarkdownIt

viewer.jsline 228

MarkdownIt instance

markdownitHighlight:

MarkdownIt

viewer.jsline 222

MarkdownIt hightlight instance

Static Methods

defineExtension(name, ext)viewer.jsline 194

Define extension

PARAMETERS
NameTypeDescription

name

string

Extension name

ext

ExtManager~extension

extension

Instance Methods

addHook(type, handler)viewer.jsline 160

Add hook to Viewer preview's event

PARAMETERS
NameTypeDescription

type

string

Event type

handler

function

Event handler

isMarkdownMode()viewer.jsline 177

Return false

RETURNS:
{

boolean

}

isViewer()viewer.jsline 169

Return true

RETURNS:
{

boolean

}

isWysiwygMode()viewer.jsline 185

Return false

RETURNS:
{

boolean

}

off(type)viewer.jsline 137

Unbind eventHandler from event type

PARAMETERS
NameTypeDescription

type

string

Event type

on(type, handler)viewer.jsline 129

Bind eventHandler to event type

PARAMETERS
NameTypeDescription

type

string

Event type

handler

function

Event handler

remove()viewer.jsline 144

Remove Viewer preview from document

setMarkdown(markdown)viewer.jsline 108

Set content for preview

PARAMETERS
NameTypeDescription

markdown

string

Markdown text

deprecatedsetValue(markdown)viewer.jsline 120

Set content for preview

PARAMETERS
NameTypeDescription

markdown

string

Markdown text

Resizable