Preview($el, eventManager, convertor, isViewer)

Class Preview

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

Creates an instance of Preview.

Parameters:
Name Type Description
$el jQuery

Container element for preview

eventManager EventManager

Event manager instance

convertor Convertor

Convertor instance

isViewer boolean

whether viewer mode or not

Methods

getHTML() → {string}

get html string

Returns:
string -
  • html preview string

isVisible() → {boolean}

Is Preview visible

Returns:
boolean -

result

refresh(markdown)

Refresh rendering

Parameters:
Name Type Description
markdown string

Markdown text

protected 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

setHTML(html)

set html string

Parameters:
Name Type Description
html string

html preview string

setMinHeight(minHeight)

set min height

Parameters:
Name Type Description
minHeight number

min height