--Value
-
+
@@ -609,7 +609,7 @@ Applied options
imageTable.innerHTML = '';
var options = {
- strictMode: document.getElementById('strictMode').checked ? true : undefined,
+ strictMode: document.getElementById('strictMode').checked ? undefined : false,
defaultTag: document.getElementById('defaultTag').checked ? document.getElementById('defaultTag_value').value : undefined,
textTags: document.getElementById('textTags').checked ? {
bold: 'b',
diff --git a/src/lib/core.js b/src/lib/core.js
index d23ebdb6..1e8bfc01 100755
--- a/src/lib/core.js
+++ b/src/lib/core.js
@@ -6256,12 +6256,14 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
this._editorRange();
}
- if (util.isBreak(format.nextSibling)) util.removeItem(format.nextSibling);
- if (util.isBreak(format.previousSibling)) util.removeItem(format.previousSibling);
- if (util.isBreak(focusNode)) {
- const zeroWidth = util.createTextNode(util.zeroWidthSpace);
- focusNode.parentNode.insertBefore(zeroWidth, focusNode);
- focusNode = zeroWidth;
+ if (format) {
+ if (util.isBreak(format.nextSibling)) util.removeItem(format.nextSibling);
+ if (util.isBreak(format.previousSibling)) util.removeItem(format.previousSibling);
+ if (util.isBreak(focusNode)) {
+ const zeroWidth = util.createTextNode(util.zeroWidthSpace);
+ focusNode.parentNode.insertBefore(zeroWidth, focusNode);
+ focusNode = zeroWidth;
+ }
}
this.effectNode = null;