test.vue 781 Bytes
<!--
 * @Date: 2024-07-23 10:29:03
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2024-07-26 18:02:58
 * @FilePath: /temple_material_request/src/views/test.vue
 * @Description: 文件描述
-->
<template>
  <div class="tinymce-box">
    <!-- <TEditor ref="refEdit" ></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>