I'm trying to create a script in which you can ONLY remove content in a DIV, not the DIV tags in the TinyMCE editor that is used in WordPress.
For instance:
<div class="name"> content </div>
In the TinyMCE editor, I would like the user to be able to delete their βcontentβ, but in order for the backspace / delete key to be disabled when it comes to deleting it, they should be prohibited.
I was thinking of something like:
<div class="name"> content </div>
Since the user does not see the HTML code in the TinyMCE Visual area, it is probably only allowed for editable content, and after the recognition is empty, all delete functions (mouse / keyboard) will be disabled to save the div.
Hope this makes sense if you don't let me know and I will try to provide more information. I looked high and low for a potential solution, but I'm not sure the best way to solve this.
Thanks.
source share