Skip to content

uframe / CreateUframeEditorOptions

Interface: CreateUframeEditorOptions

Defined in: client.ts:13

Properties

activePageId?

ts
optional activePageId?: string;

Defined in: client.ts:26

Which page is active on load (defaults to the first).


document?

ts
optional document?: PageDocument;

Defined in: client.ts:19

Initial document; sent on the editor's ready handshake. Single-page mode.


onActivePageChange?

ts
optional onActivePageChange?: (pageId) => void;

Defined in: client.ts:38

The user switched the active page inside the editor.

Parameters

pageId

string

Returns

void


onChange?

ts
optional onChange?: (document) => void;

Defined in: client.ts:33

Content edit of the active page. document.id identifies which page.

Parameters

document

PageDocument

Returns

void


onError?

ts
optional onError?: (message) => void;

Defined in: client.ts:39

Parameters

message

string

Returns

void


onPagesChange?

ts
optional onPagesChange?: (pages, activePageId) => void;

Defined in: client.ts:36

Structural change to the page set (add / delete / reorder / rename).

Parameters

pages

PageDocument[]

activePageId

string

Returns

void


onReady?

ts
optional onReady?: () => void;

Defined in: client.ts:31

Returns

void


onSave?

ts
optional onSave?: (document) => void;

Defined in: client.ts:34

Parameters

document

PageDocument

Returns

void


pages?

ts
optional pages?: PageDocument[];

Defined in: client.ts:24

Initial set of pages. When provided, the editor runs in multi-page mode and renders a page switcher. Each page is a PageDocument (carries id + title).


plugins?

ts
optional plugins?: string[];

Defined in: client.ts:30

URLs of plugin dist modules to load into the editor on the ready handshake.


readonly?

ts
optional readonly?: boolean;

Defined in: client.ts:27


src

ts
src: string;

Defined in: client.ts:17

URL of the built embed app (embed-dist/index.html).


target

ts
target: HTMLElement;

Defined in: client.ts:15

Where to mount: a container (an iframe is created inside) or an existing iframe.


theme?

ts
optional theme?: UframeTheme;

Defined in: client.ts:28