Skip to main content

html

Documentation / editor/rendering/html

DeltaFromHTMLOptions​

Defined in: editor/rendering/html.ts:19

Properties​

PropertyTypeDefined in

collapseWhitespace?

boolean

editor/rendering/html.ts:21

possiblePartial?

boolean

editor/rendering/html.ts:20


FromDomOptions​

Defined in: editor/rendering/html.ts:24

Properties​

PropertyTypeDefined in

collapseWhitespace?

boolean

editor/rendering/html.ts:31

endNode?

Node

editor/rendering/html.ts:27

includeIds?

boolean

editor/rendering/html.ts:30

offset?

number

editor/rendering/html.ts:28

possiblePartial?

boolean

editor/rendering/html.ts:29

root?

HTMLElement

editor/rendering/html.ts:25

startNode?

Node

editor/rendering/html.ts:26


BLOCK_ELEMENTS​

const BLOCK_ELEMENTS: "address, article, aside, blockquote, editor, dd, div, dl, dt, fieldset, figcaption, figure, footer, form,  header, hr, li, main, nav, noscript, ol, output, p, pre, section, table, tfoot, ul, video" = 'address, article, aside, blockquote, editor, dd, div, dl, dt, fieldset, figcaption, figure, footer, form,  header, hr, li, main, nav, noscript, ol, output, p, pre, section, table, tfoot, ul, video';

Defined in: editor/rendering/html.ts:9


cleanText()​

function cleanText(delta: default): void;

Defined in: editor/rendering/html.ts:90

Parameters​

ParameterType

delta

default

Returns​

void


deltaFromDom()​

function deltaFromDom(editor: Editor, options: FromDomOptions): default;

Defined in: editor/rendering/html.ts:99

Parameters​

ParameterTypeDefault value

editor

Editor

undefined

options

FromDomOptions

defaultOptions

Returns​

default


deltaFromHTML()​

function deltaFromHTML(
editor: Editor,
html: string,
options?: DeltaFromHTMLOptions): default;

Defined in: editor/rendering/html.ts:64

Parameters​

ParameterType

editor

Editor

html

string

options?

DeltaFromHTMLOptions

Returns​

default


docFromDom()​

function docFromDom(editor: Editor, root: HTMLElement): default;

Defined in: editor/rendering/html.ts:76

Parameters​

ParameterType

editor

Editor

root

HTMLElement

Returns​

default


docFromHTML()​

function docFromHTML(
editor: Editor,
html: string,
selection?: EditorRange): default;

Defined in: editor/rendering/html.ts:60

Parameters​

ParameterType

editor

Editor

html

string

selection?

EditorRange

Returns​

default


docToHTML()​

function docToHTML(editor: Editor, doc: default): string;

Defined in: editor/rendering/html.ts:50

Parameters​

ParameterType

editor

Editor

doc

default

Returns​

string


fromNode()​

function fromNode(editor: Editor, dom: HTMLElement): Line | Line[];

Defined in: editor/rendering/html.ts:81

Parameters​

ParameterType

editor

Editor

dom

HTMLElement

Returns​

Line | Line[]


inlineToHTML()​

function inlineToHTML(editor: Editor, delta: default): string;

Defined in: editor/rendering/html.ts:54

Parameters​

ParameterType

editor

Editor

delta

default

Returns​

string


isBRPlaceholder()​

function isBRPlaceholder(editor: Editor, node: Node): boolean;

Defined in: editor/rendering/html.ts:35

Parameters​

ParameterType

editor

Editor

node

Node

Returns​

boolean