Preview

Preview

Constructor

new Preview($el, eventManager, convertor, isViewOnly)

Parameters:
Name Type Description
$el jQuery

Container element for preview

eventManager EventManager

Event manager instance

convertor Convertor

Convertor instance

isViewOnly boolean

whether viewOnly mode or not

Methods

isVisible() → {boolean}

Is Preview visible

Returns:
boolean -

result

refresh(markdown)

Refresh rendering

Parameters:
Name Type Description
markdown string

Markdown text

render(html)

Render HTML on preview

Parameters:
Name Type Description
html string

HTML string

setHeight(height)

Set preview height

Parameters:
Name Type Description
height number

Height for preview container