It is essential to import a custom extension if you want to broaden the functionalities in the package called tiptap-vuetify
. This package allows you to utilize a limited set of sections such as:
Heading,
Bold,
Italic,
Strike,
Underline,
Code,
CodeBlock,
Paragraph,
BulletList,
OrderedList,
ListItem,
Blockquote,
HardBreak,
HorizontalRule,
History,
Link
The following code snippet can provide assistance:
<template>
<div>
<tiptap-vuetify v-model="content" :extensions="extensions" />
</div>
</template>
<script>
import {
// component
TiptapVuetify,
Underline,
Bold,
Italic,
Link,
Paragraph,
BulletList,
ListItem,
History,
} from "tiptap-vuetify";
export default {
components: { TiptapVuetify },
created() {
this.$vuetify.rtl = false;
},
data: () => ({
extensions: [
new Bold(),
new Italic(),
new Underline(),
// new Code(),
// new CodeBlock(),
new Paragraph(),
new BulletList(),
// new OrderedList(),
new ListItem(),
new Link(),
// new Blockquote(),
// new HardBreak(), // Shift + Enter
// new HorizontalRule(),
new History(),
],
content: `
<h1>Most basic use</h1>
<p>
You can use the necessary Extensions.
The corresponding buttons are
<strong>
added automatically
</strong>.
</p>
<pre><code><tiptap-vuetify v-model="content" :extensions="extensions"/></code></pre>
<p></p>
<h2>Icons</h2>
<p>Avaliable icons groups:</p>
<ol>
<li>
<p>Material Design <em>Official</em></p>
</li>
<li>
<p>Font Awesome (FA)</p>
</li>
<li>
<p>Material Design Icons (MDI)</p>
</li>
</ol>
<p></p>
<blockquote>
<p>This package is awesome!</p>
</blockquote>
<p></p>
`,
}),
};
</script>
For further information, you can also refer to this helpful link