diff --git a/src/index.ts b/src/index.ts index 574f9e26..15852ef3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,7 +35,7 @@ import {afterRenderEvent} from "./ts/wysiwyg/afterRenderEvent"; import {WYSIWYG} from "./ts/wysiwyg/index"; import {input} from "./ts/wysiwyg/input"; import {renderDomByMd} from "./ts/wysiwyg/renderDomByMd"; -import {execAfterRender} from "./ts/util/fixBrowserBehavior"; +import {execAfterRender, insertEmptyBlock} from "./ts/util/fixBrowserBehavior"; import {accessLocalStorage} from "./ts/util/compatibility"; class Vditor extends VditorMethod { @@ -353,6 +353,11 @@ class Vditor extends VditorMethod { } } + /** 空块 */ + public insertEmptyBlock(position: InsertPosition) { + insertEmptyBlock(this.vditor, position); + } + /** 清空 undo & redo 栈 */ public clearStack() { this.vditor.undo.clearStack(this.vditor);