MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / extend

Method extend

packages/core/src/engine/editor.ts:170–182  ·  view source on GitHub ↗
(pluginManager: Plugins)

Source from the content-addressed store, hash-verified

168 }
169
170 async extend(pluginManager: Plugins) {
171 this.eventBus.emit(EDITOR_EVENT.BEFORE_EXTEND)
172
173 try {
174 const { lifeCycles = {} } = this.config!
175 lifeCycles?.extend?.(this)
176 await pluginManager.extend()
177 } catch (err) {
178 logger.warn(err)
179 }
180
181 this.eventBus.emit(EDITOR_EVENT.AFTER_EXTEND)
182 }
183
184 initHooks = (hooks: HookConfig[]) => {
185 this.hooks = hooks.map(hook => ({

Callers

nothing calls this directly

Calls 3

warnMethod · 0.80
extendMethod · 0.65
emitMethod · 0.45

Tested by

no test coverage detected