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> | ||||||
| 	<div v-else class="textnode"> | 	<div v-else class="textnode"> | ||||||
| 		<!--pre>TextNode {{item}} {{typeof(item)}}</pre--> | 		<!--pre>TextNode {{item}} {{typeof(item)}}</pre--> | ||||||
| 		<div v-if="editorShow"> | 		<template v-if="editorShow"> | ||||||
| 
 | 
 | ||||||
| 			<div v-if="plainEditShow"> | 			<div v-if="plainEditShow"> | ||||||
| 				<textarea id="textarea" v-model="currentText" rows="8" cols="50"></textarea> | 				<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> | ||||||
| 
 | 
 | ||||||
| 			<div v-else> | 			<div v-else> | ||||||
| 				<component v-bind:is="editorComponent" :editor="editor" v-model="currentText" :config="editorConfig"></component> | 				<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="plainEditShow=!plainEditShow">Editovat HTML</button> | ||||||
| 				<button v-on:click="saveText">Uložit</button> | 				<button v-on:click="saveText">Uložit</button> | ||||||
| 				<button v-on:click="currentText = originalText;editorShow=!editorShow;">Zahodit úpravy</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> | 			<p v-html="currentText"></p> | ||||||
| 			<button v-on:click="editorShow=!editorShow">Upravit</button> | 			<button v-on:click="editorShow=!editorShow">Upravit</button> | ||||||
| 		</div> | 		</template> | ||||||
| 	</div> | 	</div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Kateřina Č
						Kateřina Č