I am trying to provide bootstrap-wysiwyg editor. It works fine in firefox but in IE I am getting exception
Unhandled exception at line 30, column 7 in http://localhost:21585/Scripts/plugins/bootstrap-wysiwyg.js
0x80040100 - JavaScript runtime error: This mand is not supported.
The line is
if (document.queryCommandState(mand)) {
mand = "fontSize 5"
Any idea?
I am trying to provide bootstrap-wysiwyg editor. It works fine in firefox but in IE I am getting exception
Unhandled exception at line 30, column 7 in http://localhost:21585/Scripts/plugins/bootstrap-wysiwyg.js
0x80040100 - JavaScript runtime error: This mand is not supported.
The line is
if (document.queryCommandState(mand)) {
mand = "fontSize 5"
Any idea?
Since IE can't handle "fontSize 5" you have to remove the "5".
So locate the following lines in bootstrap-wysiwyg.js
var mand = $(this).data(options.mandRole);
if (document.queryCommandState(mand)) {
and change it to look like this
var mand = $(this).data(options.mandRole);
mand = mand.split(' ').shift();
if (document.queryCommandState(mand)) {
I resolve this issue as below: find:
$(options.toolbarSelector).find(toolbarBtnSelector).each(function () {
var mand = $(this).data(options.mandRole);
if (document.queryCommandState(mand)) {
change this line:
if (document.queryCommandState(mand))
to:
if (editor.is(':focus') && document.queryCommandState(mand))
As the error suggests, "fontSize 5" is not a valid mand name. Use "fontSize" instead.
References: