✨ feat: 新增 WYSIWYG 编辑器功能和相关工具栏事件处理
This commit is contained in:
11
web/include/vditor/src/ts/markdown/getHTML.ts
Normal file
11
web/include/vditor/src/ts/markdown/getHTML.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import {getMarkdown} from "./getMarkdown";
|
||||
|
||||
export const getHTML = (vditor: IVditor) => {
|
||||
if (vditor.currentMode === "sv") {
|
||||
return vditor.lute.Md2HTML(getMarkdown(vditor));
|
||||
} else if (vditor.currentMode === "wysiwyg") {
|
||||
return vditor.lute.VditorDOM2HTML(vditor.wysiwyg.element.innerHTML);
|
||||
} else if (vditor.currentMode === "ir") {
|
||||
return vditor.lute.VditorIRDOM2HTML(vditor.ir.element.innerHTML);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user