but that will without a doubt cause you to run into all kinds of issues, since browsers don’t really handle this type of mixing of editable and uneditable content very well.
toDOM() {
return [
'parenthetical', // this can be "div" or any element. I use a custom element here so I can target it in css
["span", {'contenteditable': false, class: 'parenthetical-opening'}, "("],
["span", {class: 'parenthetical-content'}, 0],
["span", {'contenteditable': false, class: 'parenthetical-closing'}, ")"]]
},
I’m even more new here and can’t figure out exactly what I’m doing wrong here.
I would like to wrap my text in a span as well. Something like this:
‘’ +selectionText+’’;
I’m not sure if replaceWith is the right way. I’m very new to ProseMirror, still trying to learn now to work with it. Is there somewhere that there are full working examples to look at?
I have a working example here: Hdzauw (forked) - StackBlitz
I just want to be able to select some text, click on the button and wrap the text in the highlight-teal class with the new id.