Descrease/remove number/bullet level on backspace

  • I am trying to get wprichtext to work like Word when a user backspaces at the start of a numbered or bulleted paragraph. And also with an indented para. I am not getting very far!

    Code so far:

    The first section of the code only works if a top level number/bullet. Not sure how to get it to decrease the indent by 1. Any pointers please?