Replies: 2 comments
-
I found out what caused the problem for us. We were using CSS to set a custom I think using an obsolete API is a general issue though that should be addressed, because it could break again at any time, so I'll leave this issue here open for now. |
Beta Was this translation helpful? Give feedback.
-
We have the exact same issue with bold text. We want to use our company's font, which needs to be weight 400 to work properly on Safari. Are there any workarounds? |
Beta Was this translation helpful? Give feedback.
-
Hi,
we're using Editor.js inside a Vue application. We recently noticed that we can no longer remove boldness from any text marked as bold. Using the example editor on editorjs.io it still works, but not in the context of our app.
This only affects the bold feature, not italic.
While investigating I noticed that editorjs is using
execCommand
andqueryCommandState
for these markup features, both of which are marked as obsolete in MDN. I assume this might be the cause of this bug we're experiencing, that somehow we created circumstances where both commands don't work correctly anymore and it probably also won't be fixed in the browser (in our case Chrome) because it's using an obsolete feature.Selecting bold text and executing
document.queryCommandState('bold')
returnsfalse
, whiledocument.execCommand('bold')
does returntrue
but changes nothing about the selected text. In the DOM the text is wrapped in a simple<b>
.For
italic
this all works as expected –queryCommandState
returnstrue
andexecCommand
toggles the existence of ai
parent node.Are there any current plans to move away from using
execCommand
and friends?Beta Was this translation helpful? Give feedback.
All reactions