mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	Merge pull request #941 from process/ck-logging
Add server logging for CKEditor state changes
This commit is contained in:
		| @@ -165,13 +165,13 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { | |||||||
|  |  | ||||||
|         this.watchdog.on("stateChange", () => { |         this.watchdog.on("stateChange", () => { | ||||||
|             const currentState = this.watchdog.state; |             const currentState = this.watchdog.state; | ||||||
|  |             logInfo(`CKEditor state changed to ${currentState}`); | ||||||
|  |  | ||||||
|             if (!["crashed", "crashedPermanently"].includes(currentState)) { |             if (!["crashed", "crashedPermanently"].includes(currentState)) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             console.log(`CKEditor changed to ${currentState}`); |             logInfo(`CKEditor crash logs: ${JSON.stringify(this.watchdog.crashes)}`); | ||||||
|  |  | ||||||
|             this.watchdog.crashes.forEach((crashInfo) => console.log(crashInfo)); |             this.watchdog.crashes.forEach((crashInfo) => console.log(crashInfo)); | ||||||
|  |  | ||||||
|             if (currentState === "crashedPermanently") { |             if (currentState === "crashedPermanently") { | ||||||
| @@ -182,6 +182,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget { | |||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         this.watchdog.setCreator(async (elementOrData, editorConfig) => { |         this.watchdog.setCreator(async (elementOrData, editorConfig) => { | ||||||
|  |             logInfo("Creating new CKEditor"); | ||||||
|             const extraOpts = {}; |             const extraOpts = {}; | ||||||
|             if (isClassicEditor) { |             if (isClassicEditor) { | ||||||
|                 extraOpts.toolbar = { |                 extraOpts.toolbar = { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user