본문으로 건너뛰기

@shakrmedia/editor-sdk ShakrreadyEditor

ShakrreadyEditor class

Shakr Editor class which returns a instance that can communicates with Shakrready Editor iframe window.

Signature:
export declare class ShakrreadyEditor extends EventEmitter<ShakrreadyEditorEventMap> 
Extends:

EventEmitter<ShakrreadyEditorEventMap>

Constructors

ConstructorModifiersDescription
(constructor)(options)Constructor for ShakrEditor class. See ShakrreadyEditorOptions for details.

Properties

PropertyModifiersTypeDescription
is_openbooleanWhether Shakrready Editor is opened or not.
template_style_version_idstringTemplate Style Version object id which is used to open Shakrready Editor. See ShakrreadyEditorOptions.template_style_version_id for details.

Methods

MethodModifiersDescription
close(): voidClose Shakrready Editor iframe window.
launch(): thisLaunch Shakrready Editor and open its iframe window.
off<K extends keyof ShakrreadyEditorEventMap>(type: K, listener: (this: this, event: ShakrreadyEditorEventMap[K]) => void): this
on(type: 'init', listener: () => void): thisinit event emitted when Shakrready Editor window is initialized properly.
on(type: 'load', listener: () => void): thisload event emitted when Shakrready Editor is fully loaded and ready to be used.
on(type: 'error', listener: (data: ShakrreadyEditorErrorEvent) => void): thiserror event emitted when there is an error while loading Shakrready Editor. Shakrready Editor iframe window will be closed when this event is emitted.
on(type: 'closed', listener: () => void): thisclosed event emitted when a user closed Shakrready Editor.
on(type: 'finish', listener: () => void): thisfinish event emitted when Shakrready Editor finishes a editing session.