WwCodeBlockManager

WwCodeBlockManager

Constructor

new WwCodeBlockManager(wwe)

Parameters:
Name Type Description
wwe WysiwygEditor

wysiwygEditor instance

Members

static this.name :string

Name property

Methods

convertToCodeblock(nodes) → {HTMLElement}

Wrap nodes into code block

Parameters:
Name Type Description
nodes Array.<Node>

Node array

Returns:
HTMLElement -

Code block element

isInCodeBlock(range) → {boolean}

Return boolean value of whether current range is in the code block

Parameters:
Name Type Description
range Range

Range object

Returns:
boolean

prepareToPasteOnCodeblock(nodes) → {DocumentFragment}

Convert copied nodes to code block if need

Parameters:
Name Type Description
nodes Array.<Node>

Node array

Returns:
DocumentFragment