mirror of
https://github.com/codex-team/editor.js
synced 2024-06-29 19:02:42 +02:00
35 lines
682 B
TypeScript
35 lines
682 B
TypeScript
Revert "Release: 2.19 (#1341)" (#1363)
This reverts commit 78775703c967dee84d75689135333b5d89db392b.
|
import { InlineToolbar } from '../../../../types/api/inline-toolbar';
|
||
import Module from '../../__module';
|
|||
|
|||
/**
|
|||
* @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();
|
|||
}
|
|||
}
|