Skip to content

Commit

Permalink
Add more logging of CKEditor crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
process committed Jan 14, 2025
1 parent 7768511 commit b173429
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/public/app/widgets/type_widgets/editable_text.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {

this.watchdog.on("stateChange", () => {
const currentState = this.watchdog.state;
logInfo(`CKEditor state changed to ${currentState}`);

if (!["crashed", "crashedPermanently"].includes(currentState)) {
return;
}

logInfo(`CKEditor changed to ${currentState}`)

logInfo(`CKEditor crash logs: ${JSON.stringify(this.watchdog.crashes)}`);
this.watchdog.crashes.forEach((crashInfo) => console.log(crashInfo));

if (currentState === "crashedPermanently") {
Expand All @@ -182,7 +182,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
});

this.watchdog.setCreator(async (elementOrData, editorConfig) => {
logInfo("Creating new CKEditor")
logInfo("Creating new CKEditor");
const extraOpts = {};
if (isClassicEditor) {
extraOpts.toolbar = {
Expand Down

0 comments on commit b173429

Please sign in to comment.