mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 03:39:01 +08:00
demos: add tippy duration to all menu demos
This commit is contained in:
parent
3462e56252
commit
ab4a0e2507
@ -17,7 +17,7 @@ export default () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{editor && <BubbleMenu editor={editor}>
|
{editor && <BubbleMenu editor={editor} tippyOptions={{ duration: 100 }}>
|
||||||
<button
|
<button
|
||||||
onClick={() => editor.chain().focus().toggleBold().run()}
|
onClick={() => editor.chain().focus().toggleBold().run()}
|
||||||
className={editor.isActive('bold') ? 'is-active' : ''}
|
className={editor.isActive('bold') ? 'is-active' : ''}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<bubble-menu :editor="editor" v-if="editor">
|
<bubble-menu :editor="editor" :tippy-options="{ duration: 100 }" v-if="editor">
|
||||||
<button @click="editor.chain().focus().toggleBold().run()" :class="{ 'is-active': editor.isActive('bold') }">
|
<button @click="editor.chain().focus().toggleBold().run()" :class="{ 'is-active': editor.isActive('bold') }">
|
||||||
bold
|
bold
|
||||||
</button>
|
</button>
|
||||||
|
@ -18,7 +18,7 @@ export default () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{editor && <FloatingMenu editor={editor}>
|
{editor && <FloatingMenu editor={editor} tippyOptions={{ duration: 100 }}>
|
||||||
<button
|
<button
|
||||||
onClick={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
|
onClick={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
|
||||||
className={editor.isActive('heading', { level: 1 }) ? 'is-active' : ''}
|
className={editor.isActive('heading', { level: 1 }) ? 'is-active' : ''}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<floating-menu :editor="editor" v-if="editor">
|
<floating-menu :editor="editor" :tippy-options="{ duration: 100 }" v-if="editor">
|
||||||
<button @click="editor.chain().focus().toggleHeading({ level: 1 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
|
<button @click="editor.chain().focus().toggleHeading({ level: 1 }).run()" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
|
||||||
H1
|
H1
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user