index.d.ts 588 B

1234567891011121314151617181920
  1. import Editor from '../editor';
  2. export interface RegisterOptions {
  3. intention: any;
  4. config?: any;
  5. }
  6. export declare type pluginsListType = {
  7. [key: string]: RegisterOptions;
  8. };
  9. /**
  10. * 插件注册
  11. * @param { string } name 插件名
  12. * @param { RegisterOptions } options 插件配置
  13. * @param { pluginsListType } memory 存储介质
  14. */
  15. export declare function registerPlugin(name: string, options: RegisterOptions, memory: pluginsListType): void;
  16. /**
  17. * 插件初始化
  18. * @param { Editor } editor 编辑器实例
  19. */
  20. export default function initPlugins(editor: Editor): void;