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#39

document

Readonly document: Document | () => Document

Defined in

src/core/create/create.ts#40


createAttributes

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

Defined in

src/core/create/create.ts#41

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#46

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#50


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#81

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#82


sandbox

sandbox(): [HTMLElement, HTMLIFrameElement]

Returns

[HTMLElement, HTMLIFrameElement]

Implementation of

ICreate.sandbox

Defined in

src/core/create/create.ts#101


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#117

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#118


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#141

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#142


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#164


fake

fake(): Text

Create invisible text node

Returns

Text

Implementation of

ICreate.fake

Defined in

src/core/create/create.ts#171


fragment

fragment(): DocumentFragment

Create HTML Document fragment element

Returns

DocumentFragment

Implementation of

ICreate.fragment

Defined in

src/core/create/create.ts#178


fromHTML

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

Create a DOM element from HTML text

// eslint-disable-next-line tsdoc/syntax

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#198


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:231