add basic font-family extension
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<div v-if="editor">
|
||||
<button @click="editor.chain().focus().fontFamily('Inter').run()">
|
||||
Inter
|
||||
</button>
|
||||
<button @click="editor.chain().focus().fontFamily('Comic Sans MS').run()">
|
||||
Comic Sans
|
||||
</button>
|
||||
|
||||
<editor-content :editor="editor" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -12,6 +19,7 @@ import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Text from '@tiptap/extension-text'
|
||||
import Heading from '@tiptap/extension-heading'
|
||||
import TextStyle from '@tiptap/extension-text-style'
|
||||
import FontFamily from '@tiptap/extension-font-family'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -32,6 +40,7 @@ export default {
|
||||
Text(),
|
||||
Heading(),
|
||||
TextStyle(),
|
||||
FontFamily(),
|
||||
],
|
||||
content: `
|
||||
<h2>Hello</h2>
|
||||
|
||||
Reference in New Issue
Block a user