javascript document.queryCommandState() "superscript" / "subscript" 不适用于 chrome
javascript document.queryCommandState() "superscript" / "subscript" not work on chrome
我使用了mindmup/bootstrap-wysiwyg(github),然后添加了"superscript"和"subscript"。它在 firefox 上运行良好,但在 chrome 上无法运行。
我检查了 javascript code,行:30
document.queryCommandState(command)
总是return错误
PS,问题同https://github.com/mindmup/bootstrap-wysiwyg/issues/63
如何解决这个问题??
有很多不一致之处。有关相当全面的列表,请参阅 https://github.com/guardian/scribe/blob/master/BROWSERINCONSISTENCIES.md。
我认为 document.queryCommandState(command)
实际上是 Internet Explorer 的东西。不管它的来源如何,为什么浏览器制造商要复制保真度如此差的功能?我不知道。也许你应该问问他们。
至于以独立于浏览器的方式检查 sub/super,您必须找到父节点并检查标签。
我使用了mindmup/bootstrap-wysiwyg(github),然后添加了"superscript"和"subscript"。它在 firefox 上运行良好,但在 chrome 上无法运行。 我检查了 javascript code,行:30
document.queryCommandState(command)
总是return错误
PS,问题同https://github.com/mindmup/bootstrap-wysiwyg/issues/63
如何解决这个问题??
有很多不一致之处。有关相当全面的列表,请参阅 https://github.com/guardian/scribe/blob/master/BROWSERINCONSISTENCIES.md。
我认为 document.queryCommandState(command)
实际上是 Internet Explorer 的东西。不管它的来源如何,为什么浏览器制造商要复制保真度如此差的功能?我不知道。也许你应该问问他们。
至于以独立于浏览器的方式检查 sub/super,您必须找到父节点并检查标签。