Skip to content

Commit a62b42f

Browse files
committed
Fix breaking change from CKE5 v45+ with icons for alert and panel plugins
1 parent 2281cd8 commit a62b42f

8 files changed

Lines changed: 6467 additions & 13091 deletions

File tree

modules/custom/wxt_ext/wxt_ext_editor/js/build/wxt_alert.js

Lines changed: 385 additions & 506 deletions
Large diffs are not rendered by default.

modules/custom/wxt_ext/wxt_ext_editor/js/build/wxt_panel.js

Lines changed: 250 additions & 429 deletions
Large diffs are not rendered by default.

modules/custom/wxt_ext/wxt_ext_editor/js/ckeditor5_plugins/wxt_alert/src/alertui.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ export default class AlertUI extends Plugin {
3636
const headingLevel = formView.headingDropdown.selectedValue || 'h3';
3737

3838
if (alerttype === null || typeof alerttype === 'undefined') {
39-
return; // Optionally show validation message
39+
return;
4040
}
4141

42-
console.log(alerttype);
43-
4442
let selectionAncestors = editor.model.document.selection.getFirstPosition().getAncestors();
4543
let selectionIsAlert = false;
4644
let selection = null;

modules/custom/wxt_ext/wxt_ext_editor/js/ckeditor5_plugins/wxt_alert/src/alertview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ViewModel,
88
} from 'ckeditor5/src/ui';
99
import { Collection } from 'ckeditor5/src/utils';
10-
import { icons } from 'ckeditor5/src/core';
10+
import { IconCheck, IconCancel } from 'ckeditor5/src/icons';
1111
import { AlertClasses } from './alertcssclasses';
1212

1313
/*
@@ -26,9 +26,9 @@ export default class FormView extends View {
2626
const headingItems = new Collection();
2727

2828
// Create save and cancel buttons
29-
this.saveButtonView = this._createButton('Save', icons.check, 'ck-button-save');
29+
this.saveButtonView = this._createButton('Save', IconCheck, 'ck-button-save');
3030
this.saveButtonView.type = 'submit';
31-
this.cancelButtonView = this._createButton('Cancel', icons.cancel, 'ck-button-cancel');
31+
this.cancelButtonView = this._createButton('Cancel', IconCancel, 'ck-button-cancel');
3232
this.cancelButtonView.delegate('execute').to(this, 'cancel');
3333

3434
// create button for each alert class and add to the collection of buttons for the dropdown list

modules/custom/wxt_ext/wxt_ext_editor/js/ckeditor5_plugins/wxt_panel/src/panelview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ViewModel
88
} from 'ckeditor5/src/ui';
99
import { Collection } from 'ckeditor5/src/utils'
10-
import { icons } from 'ckeditor5/src/core';
10+
import { IconCheck, IconCancel } from 'ckeditor5/src/icons';
1111
import { PanelClasses } from './panelcssclasses';
1212

1313
/*
@@ -26,9 +26,9 @@ export default class FormView extends View {
2626
const headingItems = new Collection();
2727

2828
// Create save and cancel buttons
29-
this.saveButtonView = this._createButton('Save', icons.check, 'ck-button-save');
29+
this.saveButtonView = this._createButton('Save', IconCheck, 'ck-button-save');
3030
this.saveButtonView.type = 'submit';
31-
this.cancelButtonView = this._createButton('Cancel', icons.cancel, 'ck-button-cancel');
31+
this.cancelButtonView = this._createButton('Cancel', IconCancel, 'ck-button-cancel');
3232
this.cancelButtonView.delegate('execute').to(this, 'cancel');
3333

3434
// Create the dropdown list from array of panel classes

modules/custom/wxt_ext/wxt_ext_editor/package-lock.json

100755100644
Lines changed: 5824 additions & 8320 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/custom/wxt_ext/wxt_ext_editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"devDependencies": {
1212
"@ckeditor/ckeditor5-dev-utils": "^30.5.0",
13-
"ckeditor5": "^41.3.1",
13+
"ckeditor5": "^45.2.0",
1414
"css-loader": "^6.7.3",
1515
"raw-loader": "^4.0.2",
1616
"terser-webpack-plugin": "^5.2.0",

0 commit comments

Comments
 (0)