refactoring
This commit is contained in:
@@ -1,19 +1,37 @@
|
||||
<template>
|
||||
<div>
|
||||
<editor class="editor" @update="onUpdate">
|
||||
|
||||
<div class="menububble" slot="menububble" slot-scope="{ marks, focus }">
|
||||
<template v-if="marks">
|
||||
<button class="menububble__button" @click="marks.bold.command" :class="{ 'is-active': marks.bold.active() }">
|
||||
|
||||
<button
|
||||
class="menububble__button"
|
||||
:class="{ 'is-active': marks.bold.active() }"
|
||||
@click="marks.bold.command"
|
||||
>
|
||||
<icon name="bold" />
|
||||
</button>
|
||||
<button class="menububble__button" @click="marks.italic.command" :class="{ 'is-active': marks.italic.active() }">
|
||||
|
||||
<button
|
||||
class="menububble__button"
|
||||
:class="{ 'is-active': marks.italic.active() }"
|
||||
@click="marks.italic.command"
|
||||
>
|
||||
<icon name="italic" />
|
||||
</button>
|
||||
<button class="menububble__button" @click="marks.code.command" :class="{ 'is-active': marks.code.active() }">
|
||||
|
||||
<button
|
||||
class="menububble__button"
|
||||
:class="{ 'is-active': marks.code.active() }"
|
||||
@click="marks.code.command"
|
||||
>
|
||||
<icon name="code" />
|
||||
</button>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="editor__content" slot="content" slot-scope="props">
|
||||
<h1>
|
||||
Bubble Navigation
|
||||
@@ -22,6 +40,7 @@
|
||||
Hey, try to select some text.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</editor>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user