plain edit jako alternativa ckeditoru
This commit is contained in:
parent
454ebf0088
commit
d46078a117
1 changed files with 11 additions and 0 deletions
|
@ -6,9 +6,18 @@
|
|||
<!--pre>TextNode {{item}} {{typeof(item)}}</pre-->
|
||||
<div v-if="editorShow">
|
||||
<component v-bind:is="editorComponent" :editor="editor" v-model="currentText" :config="editorConfig"></component>
|
||||
|
||||
<button v-on:click="plainEditShow=!plainEditShow">Editovat HTML</button>
|
||||
<div v-if="plainEditShow">
|
||||
<textarea id="textarea" v-model="currentText" rows="8" cols="50"></textarea>
|
||||
</div>
|
||||
|
||||
<button v-on:click="saveText">Uložit</button>
|
||||
<button v-on:click="currentText = originalText;editorShow=!editorShow;">Zahodit úpravy</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div v-else v-bind:class="changedObject">
|
||||
<p v-html="currentText"></p>
|
||||
<button v-on:click="editorShow=!editorShow">Upravit</button>
|
||||
|
@ -48,6 +57,7 @@ export default {
|
|||
props: {
|
||||
item: Object,
|
||||
editorShow: Boolean,
|
||||
plainEditShow: Boolean,
|
||||
create: Boolean,
|
||||
where: String,
|
||||
refnode: Object
|
||||
|
@ -58,6 +68,7 @@ export default {
|
|||
this.currentText = "";
|
||||
this.originalText = "";
|
||||
this.editorShow = true;
|
||||
this.plainEditShow = false;
|
||||
} else {
|
||||
this.currentText = this.item.node.text.na_web;
|
||||
this.originalText = this.item.node.text.na_web;
|
||||
|
|
Loading…
Reference in a new issue