12个原创工具(批量条码/二维码识别/在线翻译/OCR/面单设计/AI修图/网站收藏/PDF工具/图片工具/文档转换等) + 卡密授权系统(CardAuth对接,30分钟试用,换卡/撤销) + 体验优化(中文默认/收藏/最近使用/菜单展开/宽屏/品牌页脚)
17 lines
613 B
Vue
17 lines
613 B
Vue
<script setup lang="ts">
|
|
import { format } from 'prettier';
|
|
import htmlParser from 'prettier/plugins/html';
|
|
import { useStorage } from '@vueuse/core';
|
|
import Editor from './editor/editor.vue';
|
|
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
|
|
|
const html = useStorage('html-wysiwyg-editor--html', '<h1>Hey!</h1><p>Welcome to this html wysiwyg editor</p>');
|
|
|
|
const formattedHtml = asyncComputed(() => format(html.value, { parser: 'html', plugins: [htmlParser] }), '');
|
|
</script>
|
|
|
|
<template>
|
|
<Editor v-model:html="html" />
|
|
<TextareaCopyable :value="formattedHtml" language="html" />
|
|
</template>
|