TreeNode editor | plain edit (snad) funguje
This commit is contained in:
		
							parent
							
								
									988388e9aa
								
							
						
					
					
						commit
						5d433509e4
					
				
					 1 changed files with 11 additions and 8 deletions
				
			
		|  | @ -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> | ||||
| 			<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> | ||||
| 			<div> | ||||
| 
 | ||||
| 		</div> | ||||
| 		</template> | ||||
| 
 | ||||
| 		<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…
	
		Reference in a new issue
	
	 Kateřina Č
						Kateřina Č