I want to limit the character count in my contenteditible div in vanilla JavaScript. I followed this post. But when the character limit is reached - you then can't delete the letters and start typing again. Please can anyone advise how to amend this code and explain why that is happening?
Javascript - How to limit character in a contentEditable div?
It's for a website where you can play with the type in the box so I want it to be easily editable.