editor.js/src/components/modules/api/inlineToolbar.ts
Peter Savchenko 63eeec0f3b
Release / 2.18 (#1181)
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
Co-authored-by: Georgy Berezhnoy <gohabereg@gmail.com>
Co-authored-by: tasuku-s <tasuku@freemind.co.jp>
Co-authored-by: Athul Anil Kumar <athul7744@outlook.com>
Co-authored-by: Taly <vitalik7tv@yandex.ru>
Co-authored-by: flaming-cl <51183663+flaming-cl@users.noreply.github.com>
Co-authored-by: Nguyen Ngoc Son <sonnn.se@gmail.com>
Co-authored-by: Sisir Das K <37764463+sis-dk@users.noreply.github.com>
Co-authored-by: Sisir <sisir@hellosivi.com>
2020-06-03 11:17:29 +03:00

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();
}
}