说明
- 源码参考《ThinkEditor.Vue3.Kit.Demo》工程
包括工具栏tab和多文档tab
ThinkEditor.Kit.js
step1: 确定需要显示的位置 示例: ref=”thinkEditorKitContainerRef”
<template>
<div class="lay-row editor-layout">
<div class="lay-column sect-right" ref="thinkEditorKitContainerRef"></div>
</div>
</template>
import { ThinkEditorKit } from "@editorLib/ThinkEditor.Kit.js";
const thinkEditorKitContainerRef = ref(null);step2: 创建ThinkEditorKit对象
var thinkEditorKit = new ThinkEditorKit({instanceName: "实例1"});step3: 页面生成后 加载ThinkEditorKit
- 注意:在不引入ThinkEditorKit时,编辑器的可显示区域父级div(thinkEditorKitContainerRef.value)就应当是可见的
- 重要:编辑器不会主动去改变父级div(thinkEditorKitContainerRef.value)尺寸
- 重要:如编辑器未显示或显示不全,请优先排查父级div(thinkEditorKitContainerRef.value)是否可见?空间尺寸是否足够?
thinkEditorKit.Load(thinkEditorKitContainerRef.value);
- 更多用法 详见demo源码和最小代码
文档更新时间: 2025-10-19 17:59 作者:admin