Accessibility First DevRel. I focus on ensuring content created, events held and company assets are as accessible as possible, for as many people as possible.
Accessibility First DevRel. I focus on ensuring content created, events held and company assets are as accessible as possible, for as many people as possible.
Nice... I would have built this
document.execCommand
was supported more, but it isn't.Yeah that is a real issue, it isn't marked for removal in any browser yet so at least 2 years use of it.
But I agree, against good practices to use it in anything new!
I should perhaps making a point of that in the next article so people don't use it without knowing the risks, thanks for the great suggestion!
But if you don't use it, you don't get undoing capabilities anymore
Undo is not too bad as we can just store the exact state each time there is an update.
Or better yet we can use doc diffing and just store the differences. I have to admit I have no idea which is better!
I think the answer I have at this point is to use it, but build it in a way I can swap it out easily. 🤷♂️
Diffing is better if you care about space, which, to be honest, is not a big concern right now, unless you plan to persist them.