mirror of
https://github.com/codex-team/editor.js
synced 2024-06-01 13:32:43 +02:00
b223d63c59
This reverts commit 78775703c9
.
35 lines
682 B
TypeScript
35 lines
682 B
TypeScript
import Module from '../../__module';
|
|
import { InlineToolbar } from '../../../../types/api/inline-toolbar';
|
|
|
|
/**
|
|
* @class InlineToolbarAPI
|
|
* Provides methods for working with the Inline Toolbar
|
|
*/
|
|
export default class InlineToolbarAPI extends Module {
|
|
/**
|
|
* Available methods
|
|
*
|
|
* @returns {InlineToolbar}
|
|
*/
|
|
public get methods(): InlineToolbar {
|
|
return {
|
|
close: (): void => this.close(),
|
|
open: (): void => this.open(),
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Open Inline Toolbar
|
|
*/
|
|
public open(): void {
|
|
this.Editor.InlineToolbar.tryToShow();
|
|
}
|
|
|
|
/**
|
|
* Close Inline Toolbar
|
|
*/
|
|
public close(): void {
|
|
this.Editor.InlineToolbar.close();
|
|
}
|
|
}
|