UNPKG

@textbus/core

Version:

Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.

19 lines (18 loc) 701 B
import { Textbus } from '../textbus'; import { AbstractType, InjectFlags, InjectionToken, Type } from '@viewfly/core'; import { Shortcut } from './types'; import { Component } from './component'; /** * 组件 setup 方法内获取编辑器 IoC 容器的勾子 */ export declare function useContext(): Textbus; export declare function useContext<T>(token: Type<T> | AbstractType<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T; /** * 组件 setup 方法内获取组件实例的勾子 */ export declare function useSelf<T extends Component>(): T; /** * 组件注册动态快捷键的勾子 * @param config */ export declare function useDynamicShortcut(config: Shortcut): void;