I am adding html block in tinymce on clicking of button
<span class='remove-block'>Kenny <span class='remove-block'>Symonds</span></span>
So far so good, tinymce adds this html block properly in editor. Now what I want is when user presses backspace tinymce should check whether there is remove-block
span element at cursor point, if yes then remove whole block. I know I have to do it on keyup like
setup: editor => {
editor.on('keyup', (event) => {
if (event.keyCode === 8) {
// backspace pressed
}
})
}
Any help would be appreciated.