I created a rich content editor based on execCommand and queryCommandState whose are now obsolete. I'm looking for a substitute to these commands, especially for
document.queryCommandState('bold')
I think the following is a good start:
window.getSelection().getRangeAt(0);
I get the current selection, but I can't figure out if the selection is in bold <b> or not.