docs: update content
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import { content } from './content.js'
|
||||
|
||||
export default {
|
||||
@@ -87,7 +87,9 @@ export default {
|
||||
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: defaultExtensions(),
|
||||
extensions: [
|
||||
StarterKit,
|
||||
],
|
||||
content,
|
||||
editorProps: {
|
||||
attributes: {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import Collaboration from '@tiptap/extension-collaboration'
|
||||
import CollaborationCursor from '@tiptap/extension-collaboration-cursor'
|
||||
import TaskList from '@tiptap/extension-task-list'
|
||||
@@ -91,7 +91,9 @@ export default {
|
||||
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions().filter(extension => extension.name !== 'history'),
|
||||
StarterKit.configure({
|
||||
history: false,
|
||||
}),
|
||||
Highlight,
|
||||
TaskList,
|
||||
TaskItem,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { useEditor, EditorContent } from '@tiptap/react'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import './styles.scss'
|
||||
|
||||
const MenuBar = ({ editor }) => {
|
||||
@@ -125,7 +125,7 @@ const MenuBar = ({ editor }) => {
|
||||
export default () => {
|
||||
const editor = useEditor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
],
|
||||
content: `
|
||||
<h2>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
],
|
||||
content: `
|
||||
<h2>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import TextAlign from '@tiptap/extension-text-align'
|
||||
import Highlight from '@tiptap/extension-highlight'
|
||||
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
TextAlign,
|
||||
Highlight,
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import Highlight from '@tiptap/extension-highlight'
|
||||
import Typography from '@tiptap/extension-typography'
|
||||
|
||||
@@ -41,7 +41,7 @@ export default {
|
||||
</p>
|
||||
`,
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
Highlight,
|
||||
Typography,
|
||||
],
|
||||
|
||||
@@ -5,13 +5,13 @@ import {
|
||||
BubbleMenu,
|
||||
FloatingMenu,
|
||||
} from '@tiptap/react'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import './styles.scss'
|
||||
|
||||
export default () => {
|
||||
const editor = useEditor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
],
|
||||
content: `
|
||||
<p>
|
||||
|
||||
@@ -45,7 +45,7 @@ import {
|
||||
BubbleMenu,
|
||||
FloatingMenu,
|
||||
} from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
],
|
||||
content: `
|
||||
<p>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import Table from '@tiptap/extension-table'
|
||||
import TableRow from '@tiptap/extension-table-row'
|
||||
import TableCell from '@tiptap/extension-table-cell'
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
Table.configure({
|
||||
resizable: true,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user