aboutsummaryrefslogtreecommitdiff
path: root/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue
diff options
context:
space:
mode:
authorGravatar renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> 2023-08-21 18:02:54 +0000
committerGravatar GitHub <noreply@github.com> 2023-08-21 18:02:54 +0000
commita2b9b157e5b8dd725afd8ed78710bca7deb7e31d (patch)
treebce95c64b5bf08ba061d913c3bd00c9ea71f4e8f /src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue
parent144f86e2dc322aa87bd8917ec7c9c04d4692327a (diff)
downloadit-tools-a2b9b157e5b8dd725afd8ed78710bca7deb7e31d.tar.gz
it-tools-a2b9b157e5b8dd725afd8ed78710bca7deb7e31d.tar.zst
it-tools-a2b9b157e5b8dd725afd8ed78710bca7deb7e31d.zip
chore(deps): update dependency prettier to v3 (#564)
* chore(deps): update dependency prettier to v3 * chore(deps): updated prettier --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
Diffstat (limited to 'src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue')
-rw-r--r--src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue b/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue
index 6923821..e6187c9 100644
--- a/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue
+++ b/src/tools/html-wysiwyg-editor/html-wysiwyg-editor.vue
@@ -1,14 +1,16 @@
<script setup lang="ts">
import { format } from 'prettier';
-import htmlParser from 'prettier/parser-html';
+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="format(html, { parser: 'html', plugins: [htmlParser] })" language="html" />
+ <TextareaCopyable :value="formattedHtml" language="html" />
</template>