test.vue 566 Bytes
<template>
  <div class="tinymce-box">
    <TEditor ref="refEdit" readonly ></TEditor>
    <div @click="getValue">获取内容</div>
    <div @click="setValue">设置内容</div>
  </div>
</template>

<script setup>
  import TEditor from "@/components/TEditor/index.vue";

  const refEdit = ref(null);

  // refEdit.value.handleGetContent()
  const getValue = () => {
    console.warn(refEdit.value.handleGetContent());
  }

  const setValue = () => {
    refEdit.value.handleSetContent('<p>test</p>')
  }
</script>

<style>
.tinymce-box {
  width: 100%;
}
</style>