mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 23:59:25 +08:00
fix missing node and mark check in readme example
This commit is contained in:
parent
518413e33f
commit
b37b7e7c28
14
README.md
14
README.md
@ -322,12 +322,14 @@ This is a basic example of building a custom menu. A more advanced menu can be f
|
||||
<template>
|
||||
<editor :extensions="extensions">
|
||||
<div slot="menubar" slot-scope="{ nodes, marks }">
|
||||
<button :class="{ 'is-active': nodes.heading.active({ level: 1 }) }" @click="nodes.heading.command({ level: 1 })">
|
||||
H1
|
||||
</button>
|
||||
<button :class="{ 'is-active': marks.bold.active() }" @click="marks.bold.command()">
|
||||
Bold
|
||||
</button>
|
||||
<div v-if="nodes && marks">
|
||||
<button :class="{ 'is-active': nodes.heading.active({ level: 1 }) }" @click="nodes.heading.command({ level: 1 })">
|
||||
H1
|
||||
</button>
|
||||
<button :class="{ 'is-active': marks.bold.active() }" @click="marks.bold.command()">
|
||||
Bold
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content" slot-scope="props">
|
||||
<p>This text can be made bold.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user