Skip to content

Commit

Permalink
Fixes issue where new elements didn't load simple classes in dialogs …
Browse files Browse the repository at this point in the history
…hannonhill/Cascade#3915
  • Loading branch information
Nadira Yasmeen committed May 14, 2020
1 parent 4c887b6 commit 1487a1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/plugins/image/src/main/js/ui/Dialog.js
Expand Up @@ -683,10 +683,11 @@ define(
}

var formatContainerHtml = '';
var classList = Settings.getClassList(editor);
if (customStyleFormatsList.length) {
formatContainerHtml = CustomStyleFormatsUtils.generateFormatMultiSelectHtml(customStyleFormatsList, data['class'], 'img', editor);
} else if (data['class']) {
formatContainerHtml = CustomStyleFormatsUtils.generateClassMultiSelectHtml(Settings.getClassList(editor), data['class']);
} else if (classList.length) {
formatContainerHtml = CustomStyleFormatsUtils.generateClassMultiSelectHtml(classList, data['class']);
}

if (formatContainerHtml.length) {
Expand Down
5 changes: 3 additions & 2 deletions src/plugins/link/src/main/js/ui/Dialog.js
Expand Up @@ -362,10 +362,11 @@ define(
}

var formatContainerHtml = '';
var classList = Settings.getLinkClassList(editor.settings);
if (customStyleFormatsList.length) {
formatContainerHtml = CustomStyleFormatsUtils.generateFormatMultiSelectHtml(customStyleFormatsList, data['class'], 'a', editor);
} else if (data['class']) {
formatContainerHtml = CustomStyleFormatsUtils.generateClassMultiSelectHtml(Settings.getLinkClassList(editor.settings), data['class']);
} else if (classList.length) {
formatContainerHtml = CustomStyleFormatsUtils.generateClassMultiSelectHtml(classList, data['class']);
}

if (formatContainerHtml.length) {
Expand Down

0 comments on commit 1487a1c

Please sign in to comment.