Skip to content

Commit

Permalink
Merge pull request #1538 from georgel-pop-lr/LPS-156925
Browse files Browse the repository at this point in the history
fix: Reset uibridge definitions each time we destroy and create and editor (#1537)
  • Loading branch information
diegonvs authored Aug 31, 2022
2 parents bf8642f + 6fd47b2 commit 23d8609
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/uibridge/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ if (!CKEDITOR.plugins.get('ae_buttonbridge')) {
* @param {Object} editor The CKEditor instance being initialized
*/
beforeInit(editor) {
BUTTON_DEFS[editor.name] = {};

editor.ui.addButton = function(buttonName, buttonDefinition) {
this.add(buttonName, CKEDITOR.UI_BUTTON, buttonDefinition);
};
Expand Down
2 changes: 2 additions & 0 deletions src/components/uibridge/menu-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ if (!CKEDITOR.plugins.get('ae_menubuttonbridge')) {
* @param {Object} editor The CKEditor instance being initialized
*/
beforeInit(editor) {
MENUBUTTON_DEFS[editor.name] = {};

editor.ui.addMenuButton = function(
menuButtonName,
menuButtonDefinition
Expand Down
2 changes: 2 additions & 0 deletions src/components/uibridge/panel-menu-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ if (!CKEDITOR.plugins.get('ae_panelmenubuttonbridge')) {
* @param {Object} editor The CKEditor instance being initialized
*/
beforeInit(editor) {
PANEL_MENU_DEFS[editor.name] = {};

editor.ui.addPanelMenuButton = function(
panelMenuButtonName,
panelMenuButtonDefinition
Expand Down
2 changes: 2 additions & 0 deletions src/components/uibridge/richcombo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ if (!CKEDITOR.plugins.get('ae_richcombobridge')) {
* @param {Object} editor The CKEditor instance being initialized
*/
beforeInit(editor) {
RICH_COMBO_DEFS[editor.name] = {};

editor.ui.addRichCombo = function(
richComboName,
richComboDefinition
Expand Down

0 comments on commit 23d8609

Please sign in to comment.