diff options
Diffstat (limited to 'src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue')
-rw-r--r-- | src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue b/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue index 7cd1256..6923821 100644 --- a/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue +++ b/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue @@ -1,16 +1,14 @@ -<template> - <editor v-model:html="html" /> - <textarea-copyable :value="format(html, { parser: 'html', plugins: [htmlParser] })" language="html" /> -</template> - <script setup lang="ts"> -import TextareaCopyable from '@/components/TextareaCopyable.vue'; import { format } from 'prettier'; import htmlParser from 'prettier/parser-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>'); </script> -<style lang="less" scoped></style> +<template> + <Editor v-model:html="html" /> + <TextareaCopyable :value="format(html, { parser: 'html', plugins: [htmlParser] })" language="html" /> +</template> |