@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>
EventEmitter<ShakrreadyEditorEventMap>
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(options) | Constructor for ShakrEditor class. See ShakrreadyEditorOptions for details. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
is_open | boolean | Whether Shakrready Editor is opened or not. | |
template_style_version_id | string | Template Style Version object id which is used to open Shakrready Editor. See ShakrreadyEditorOptions.template_style_version_id for details. |
Methods
Method | Modifiers | Description |
---|---|---|
close(): void | Close Shakrready Editor iframe window. | |
launch(): this | Launch 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): this | init event emitted when Shakrready Editor window is initialized properly. | |
on(type: 'load', listener: () => void): this | load event emitted when Shakrready Editor is fully loaded and ready to be used. | |
on(type: 'error', listener: (data: ShakrreadyEditorErrorEvent) => void): this | error 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): this | closed event emitted when a user closed Shakrready Editor. | |
on(type: 'finish', listener: () => void): this | finish event emitted when Shakrready Editor finishes a editing session. |