mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-29 03:23:25 +08:00 
			
		
		
		
	fix(rtl): wrong content when switching to an empty note
This commit is contained in:
		
							parent
							
								
									77d6cdc546
								
							
						
					
					
						commit
						a3a34cfab0
					
				| @ -492,21 +492,19 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { | ||||
|         this.refreshIncludedNote(this.$editor, noteId); | ||||
|     } | ||||
| 
 | ||||
|     async reinitialize(data = null) { | ||||
|     async reinitialize(data) { | ||||
|         if (!this.watchdog) { | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         if (!data) { | ||||
|             data = this.watchdog.editor.getData(); | ||||
|         } | ||||
|         this.watchdog.destroy(); | ||||
|         await this.createEditor(); | ||||
|         this.watchdog.editor.setData(data); | ||||
|     } | ||||
| 
 | ||||
|     async onLanguageChanged() { | ||||
|         await this.reinitialize(); | ||||
|         const data = this.watchdog.editor.getData(); | ||||
|         await this.reinitialize(data); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran