Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Fix for IE not understanding commands with parameters #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions bootstrap-wysiwyg.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
updateToolbar = function () {
if (options.activeToolbarClass) {
$(options.toolbarSelector).find(toolbarBtnSelector).each(function () {
var command = $(this).data(options.commandRole);
if (document.queryCommandState(command)) {
$(this).addClass(options.activeToolbarClass);
} else {
$(this).removeClass(options.activeToolbarClass);
var command = $(this).data(options.commandRole).split(' ')[0];
if (document.queryCommandSupported(command)) {
if (document.queryCommandState(command)) {
$(this).addClass(options.activeToolbarClass);
} else {
$(this).removeClass(options.activeToolbarClass);
}
}
});
}
Expand Down