Browse Source

TreeNode editor | plain edit (snad) funguje

export_seznamu_prednasek
Kateřina Č 4 years ago
parent
commit
5d433509e4
  1. 19
      vue_frontend/src/components/TextNode.vue

19
vue_frontend/src/components/TextNode.vue

@ -4,26 +4,29 @@
</div>
<div v-else class="textnode">
<!--pre>TextNode {{item}} {{typeof(item)}}</pre-->
<div v-if="editorShow">
<template v-if="editorShow">
<div v-if="plainEditShow">
<textarea id="textarea" v-model="currentText" rows="8" cols="50"></textarea>
<br>
<button v-on:click="plainEditShow=!plainEditShow">Editovat v editoru</button>
<button v-on:click="saveText">Uložit</button>
<button v-on:click="currentText = originalText;editorShow=!editorShow;">Zahodit úpravy</button>
</div>
<div v-else>
<component v-bind:is="editorComponent" :editor="editor" v-model="currentText" :config="editorConfig"></component>
<button v-on:click="plainEditShow=!plainEditShow">Editovat HTML</button>
<button v-on:click="saveText">Uložit</button>
<button v-on:click="currentText = originalText;editorShow=!editorShow;">Zahodit úpravy</button>
<div>
<button v-on:click="plainEditShow=!plainEditShow">Editovat HTML</button>
<button v-on:click="saveText">Uložit</button>
<button v-on:click="currentText = originalText;editorShow=!editorShow;">Zahodit úpravy</button>
</template>
</div>
<div v-else v-bind:class="changedObject">
<template v-else v-bind:class="changedObject">
<p v-html="currentText"></p>
<button v-on:click="editorShow=!editorShow">Upravit</button>
</div>
</template>
</div>
</template>

Loading…
Cancel
Save