feat: add plugin interface
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import Editor from '../..'
|
||||
import { PluginFunction } from '../../interface/Plugin'
|
||||
|
||||
export class Plugin {
|
||||
|
||||
private editor: Editor
|
||||
|
||||
constructor(editor: Editor) {
|
||||
this.editor = editor
|
||||
}
|
||||
|
||||
public use<Options>(pluginFunction: PluginFunction<Options>, options?: Options) {
|
||||
pluginFunction(this.editor, options)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user