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 command is not supported.
The line is
if (document.queryCommandState(command)) {
command = "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 command = $(this).data(options.commandRole);
if (document.queryCommandState(command)) {
and change it to look like this
var command = $(this).data(options.commandRole);
command = command.split(' ').shift();
if (document.queryCommandState(command)) {
I resolve this issue as below: find:
$(options.toolbarSelector).find(toolbarBtnSelector).each(function () {
var command = $(this).data(options.commandRole);
if (document.queryCommandState(command)) {
change this line:
if (document.queryCommandState(command))
to:
if (editor.is(':focus') && document.queryCommandState(command))
As the error suggests, "fontSize 5" is not a valid command name. Use "fontSize" instead.
References:
User contributions licensed under CC BY-SA 3.0