mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 08:46:15 -04:00
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>
This commit is contained in:
parent
144f86e2dc
commit
a2b9b157e5
3 changed files with 10 additions and 40 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue