393d4c7603
* Fix usage of deprecated event.keyCode * Add CTRL+K to insert markdown link formatting * Also add CTRL+B and CTRL+I * Fix undo not working after using setValue Undo doesn't work if inputs are changed using javascript code like helpers.setValue(). The solution is to also use `document.execCommand()`. See https://stackoverflow.com/questions/27027833/is-it-possible-to-edit-a-text-input-with-javascript-and-add-to-the-undo-stack However, `document.execCommand()` is deprecated but there seems to be no alternative, see: - https://stackoverflow.com/questions/60581285/execcommand-is-now-obsolete-whats-the-alternative - https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#browser_compatibility - https://github.com/codex-team/editor.js/discussions/2214 And so far, every browser still seems to support it: https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#browser_compatibility --------- Co-authored-by: ekzyis <ek@stacker.news>