add basic new commands

This commit is contained in:
Philipp Kühn
2018-10-28 19:26:14 +01:00
parent 11bb74babb
commit d2519c2953
5 changed files with 90 additions and 5 deletions

View File

@@ -1,7 +1,39 @@
<template>
<div class="editor">
<menu-bar class="menubar" :editor="editor">
<template slot-scope="{ nodes, marks }">
<template slot-scope="{ nodes, marks, newCommands }">
<button
class="menubar__button"
@click="newCommands.history"
v-if="newCommands.history"
>
</button>
<button
class="menubar__button"
@click="newCommands.undo"
v-if="newCommands.undo"
>
</button>
<button
class="menubar__button"
@click="newCommands.redo"
v-if="newCommands.redo"
>
</button>
<button
class="menubar__button"
@click="newCommands.undoRedo"
v-if="newCommands.undoRedo"
>
undoredo
</button>
<button
class="menubar__button"