prevent bubble when all options are shown
This commit is contained in:
parent
ca096dac89
commit
dc20ccfec0
@ -95,6 +95,34 @@ function sendMessage() {
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="editor">
|
<div v-if="editor">
|
||||||
<div id="options" v-if="showOptions">
|
<div id="options" v-if="showOptions">
|
||||||
|
<span class="category">
|
||||||
|
<SvgLoader
|
||||||
|
svg="bold"
|
||||||
|
@click="editor.chain().focus().toggleBold().run()"
|
||||||
|
:class="[{ 'is-active': editor.isActive('bold') }, 'editorOption']"
|
||||||
|
/>
|
||||||
|
<SvgLoader
|
||||||
|
svg="italic"
|
||||||
|
@click="editor.chain().focus().toggleItalic().run()"
|
||||||
|
:class="[{ 'is-active': editor.isActive('italic') }, 'editorOption']"
|
||||||
|
v-tooltip="'Italic'"
|
||||||
|
/>
|
||||||
|
<SvgLoader
|
||||||
|
svg="strikethrough"
|
||||||
|
@click="editor.chain().focus().toggleStrike().run()"
|
||||||
|
:class="[{ 'is-active': editor.isActive('strike') }, 'editorOption']"
|
||||||
|
/>
|
||||||
|
<SvgLoader
|
||||||
|
svg="underline"
|
||||||
|
@click="editor.chain().focus().toggleUnderline().run()"
|
||||||
|
:class="[{ 'is-active': editor.isActive('underline') }, 'editorOption']"
|
||||||
|
/>
|
||||||
|
<SvgLoader
|
||||||
|
svg="font-color"
|
||||||
|
@click="editor.commands.toggleHighlight({ color: '#ffcc00' })"
|
||||||
|
:class="[{ 'is-active': editor.isActive('highlight') }, 'editorOption']"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
<span class="category">
|
<span class="category">
|
||||||
<SvgLoader
|
<SvgLoader
|
||||||
svg="h-2"
|
svg="h-2"
|
||||||
@ -182,7 +210,7 @@ function sendMessage() {
|
|||||||
:class="[{ 'is-active': editor.isActive('bold') }, 'editorOption']"
|
:class="[{ 'is-active': editor.isActive('bold') }, 'editorOption']"
|
||||||
/> -->
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<bubble-menu class="bubble-menu" :tippy-options="{ duration: 100 }" :editor="editor">
|
<bubble-menu v-if="!showOptions" class="bubble-menu" :tippy-options="{ duration: 100 }" :editor="editor">
|
||||||
<SvgLoader
|
<SvgLoader
|
||||||
svg="bold"
|
svg="bold"
|
||||||
@click="editor.chain().focus().toggleBold().run()"
|
@click="editor.chain().focus().toggleBold().run()"
|
||||||
|
Loading…
Reference in New Issue
Block a user