Create

create.Create

Implements

constructor

new Create(document, createAttributes?): Create

Parameters

Name Type
document Document | () => Document
createAttributes? CanUndef<IDictionary<Attributes | NodeFunction>>

Returns

Create

Defined in

src/core/create/create.ts#41

document

Readonly document: Document | () => Document

Defined in

src/core/create/create.ts#42


createAttributes

Optional Readonly createAttributes: CanUndef<IDictionary<Attributes | NodeFunction>>

Defined in

src/core/create/create.ts#43

element

element<K>(tagName, children?): HTMLElementTagNameMap[K]

Type parameters

Name Type
K extends keyof HTMLElementTagNameMap

Parameters

Name Type
tagName K
children? Children

Returns

HTMLElementTagNameMap[K]

Implementation of

ICreate.element

Defined in

src/core/create/create.ts#48

element<K>(tagName, attributes?, children?): HTMLElementTagNameMap[K]

Type parameters

Name Type
K extends keyof HTMLElementTagNameMap

Parameters

Name Type
tagName K
attributes? Attributes
children? Children

Returns

HTMLElementTagNameMap[K]

Implementation of

ICreate.element

Defined in

src/core/create/create.ts#52


div

div(className?, childrenOrAttributes?): HTMLDivElement

Parameters

Name Type
className? string
childrenOrAttributes? Children

Returns

HTMLDivElement

Implementation of

ICreate.div

Defined in

src/core/create/create.ts#83

div(className?, childrenOrAttributes?, children?): HTMLDivElement

Parameters

Name Type
className? string
childrenOrAttributes? Attributes
children? Children

Returns

HTMLDivElement

Implementation of

ICreate.div

Defined in

src/core/create/create.ts#84


sandbox

sandbox(): [HTMLElement, HTMLIFrameElement]

Returns

[HTMLElement, HTMLIFrameElement]

Implementation of

ICreate.sandbox

Defined in

src/core/create/create.ts#103


span

span(className?, childrenOrAttributes?): HTMLSpanElement

Parameters

Name Type
className? string
childrenOrAttributes? Children

Returns

HTMLSpanElement

Implementation of

ICreate.span

Defined in

src/core/create/create.ts#119

span(className?, childrenOrAttributes?, children?): HTMLSpanElement

Parameters

Name Type
className? string
childrenOrAttributes? Attributes
children? Children

Returns

HTMLSpanElement

Implementation of

ICreate.span

Defined in

src/core/create/create.ts#120


a

a(className?, children?): HTMLAnchorElement

Parameters

Name Type
className? string
children? Children

Returns

HTMLAnchorElement

Implementation of

ICreate.a

Defined in

src/core/create/create.ts#143

a(className?, childrenOrAttributes?, children?): HTMLAnchorElement

Parameters

Name Type
className? string
childrenOrAttributes? Attributes
children? Children

Returns

HTMLAnchorElement

Implementation of

ICreate.a

Defined in

src/core/create/create.ts#144


text

text(value): Text

Create text node

Parameters

Name Type
value string

Returns

Text

Implementation of

ICreate.text

Defined in

src/core/create/create.ts#166


fake

fake(): Text

Create invisible text node

Returns

Text

Implementation of

ICreate.fake

Defined in

src/core/create/create.ts#173


fragment

fragment(): DocumentFragment

Create HTML Document fragment element

Returns

DocumentFragment

Implementation of

ICreate.fragment

Defined in

src/core/create/create.ts#180


fromHTML

fromHTML<T>(html, refsToggleElement?): T

Create DOM element from HTML text

Type parameters

Name Type
T extends HTMLElement

Parameters

Name Type Description
html string | number -
refsToggleElement? IDictionary<boolean | void> State dictionary in which you can set the visibility of some of the elements js const editor = Jodit.make('#editor'); editor.createInside.fromHTML(`<div> <input name="name" ref="name"/> <input name="email" ref="email"/> </div>`, { name: true, email: false });

Returns

T

Implementation of

ICreate.fromHTML

Defined in

src/core/create/create.ts#199


applyCreateAttributes

applyCreateAttributes(elm): void

Apply to element createAttributes options

Parameters

Name Type
elm HTMLElement

Returns

void

Implementation of

ICreate.applyCreateAttributes

Defined in

jodit/src/core/create/create.ts:232