Hello all,
While working with HTML Editor I faced an issues that, Application was getting stuck when changing elements with contenteditable="false" to numbered or bulleted list.
To change a multiline into numbered or bulleted list, we generally use document.execCommand('indent'); method and to remove the numbered or bulleted list we use document.execCommand('outdent');, but if within those multiline text, we have any <label> tag that has its contenteditable property set to false, than these method does not work properly.
To Solve this issues we have this block of Code :
document.execCommand('strikethrough');
this.$editor.find('strike').each($.proxy(function (i, s) {
var $el = $(s);
if (tag == "strong") this.so.removeBoldTagFromDiv($el);
if ($(s).closest('label').length > 0) {
$(s).find('label').prop('contenteditable ', 'true');
}
}
document.execCommand('indent');
this.$editor.find('strike').each($.proxy(function (i, s) {
var $el = $(s);
if ($(s).closest('label').length > 0) {
$(s).find('label').unwrap();
}
}
0 Comment(s)