CodeBlockPreview($el, eventManager, convertor, codeBlockEditor)

Class Code block preview

new CodeBlockPreview($el, eventManager, convertor, codeBlockEditor)

Creates an instance of CodeBlockPreview.

Parameters:
Name Type Description
$el jQuery

base element

eventManager EventManager

event manager

convertor Convertor

convertor

codeBlockEditor CodeBlockEditor

code block editor

Extends

Methods

clear()

clear preview

getHTML() → {string}

get html string

Returns:
string -
  • html preview string
Inherited From:

isVisible() → {boolean}

Is Preview visible

Returns:
boolean -

result

Inherited From:

refresh(markdown)

Refresh rendering

Parameters:
Name Type Description
markdown string

Markdown text

Overrides:

protected render(html)

Render HTML on preview

Parameters:
Name Type Description
html string

HTML string

Inherited From:

setHeight(height)

Set preview height

Parameters:
Name Type Description
height number

Height for preview container

Inherited From:

setHTML(html)

set html string

Parameters:
Name Type Description
html string

html preview string

Inherited From:

setMinHeight(minHeight)

set min height

Parameters:
Name Type Description
minHeight number

min height

Inherited From: