mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	listen to correct CKEditor event for data changes
This commit is contained in:
		
							parent
							
								
									174d4e67af
								
							
						
					
					
						commit
						21a96d2776
					
				| @ -11,13 +11,7 @@ async function show() { | |||||||
| 
 | 
 | ||||||
|         textEditor = await BalloonEditor.create($noteDetailText[0], {}); |         textEditor = await BalloonEditor.create($noteDetailText[0], {}); | ||||||
| 
 | 
 | ||||||
|         textEditor.model.document.on('change', () => { |         textEditor.model.document.on('change:data', noteDetailService.noteChanged); | ||||||
|                 // change is triggered on just marker/selection changes which is not interesting for us
 |  | ||||||
|                 if (textEditor.model.document.differ.getChanges().length > 0) { |  | ||||||
|                     noteDetailService.noteChanged(); |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         ); |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     textEditor.setData(noteDetailService.getCurrentNote().content); |     textEditor.setData(noteDetailService.getCurrentNote().content); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner