editor.js/src/components/modules/api/toolbar.ts
George Berezhnoy b223d63c59
Revert "Release: 2.19 (#1341)" (#1363)
This reverts commit 78775703c9.
2020-10-13 00:03:00 +03:00

35 lines
625 B
TypeScript

import Module from '../../__module';
import { Toolbar } from '../../../../types/api';
/**
* @class ToolbarAPI
* Provides methods for working with the Toolbar
*/
export default class ToolbarAPI extends Module {
/**
* Available methods
*
* @returns {Toolbar}
*/
public get methods(): Toolbar {
return {
close: (): void => this.close(),
open: (): void => this.open(),
};
}
/**
* Open toolbar
*/
public open(): void {
this.Editor.Toolbar.open();
}
/**
* Close toolbar and all included elements
*/
public close(): void {
this.Editor.Toolbar.close();
}
}