Skip to content

Commit

Permalink
Fixed bug where the importcss plugin would import styles into groups …
Browse files Browse the repository at this point in the history
…multiple times for different format menus.
  • Loading branch information
spocke committed Nov 20, 2013
1 parent 11238c9 commit ef81b70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Version 4.0.12 (2013-11-xx)
Fixed bug where the importcss plugin wouldn't append styles if the style_formats option was configured.
Fixed bug where the importcss plugin would import styles into groups multiple times for different format menus.
Version 4.0.11 (2013-11-20)
Added the possibility to update button icon after it's been rendered.
Added new autosave_prefix option allows you to set the prefix for the local storage keys.
Expand Down
13 changes: 7 additions & 6 deletions js/tinymce/plugins/importcss/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,13 @@ tinymce.PluginManager.add('importcss', function(editor) {
e.control.items().remove();
}

var groups = settings.importcss_groups;
if (groups) {
for (var i = 0; i < groups.length; i++) {
groups[i].filter = compileFilter(groups[i].filter);
}
}
// Setup new groups collection by cloning the configured one
var groups = [];
tinymce.each(settings.importcss_groups, function(group) {
group = tinymce.extend({}, group);
group.filter = compileFilter(group.filter);
groups.push(group);
});

each(getSelectors(editor.getDoc(), compileFilter(settings.importcss_file_filter)), function(selector) {
if (selector.indexOf('.mce-') === -1) {
Expand Down

0 comments on commit ef81b70

Please sign in to comment.