javascript - Non Editable and non removable tinymce content -


is there way make content of tinymce editor non-editable + non-removable, know can make div non-editable giving class "mcenoneditable" still can delete it. want avoid delete well.

the issue run (and why not has solved) there great many ways can "deleted". could...

  • press del or bkspace keys
  • use tinymce apis insert/set content overwrite selection includes non-editable section
  • click tinymce toolbar button or menu option insert/overwrite content when selection includes non-editable section
  • copy/paste content editor when selection includes non-editable section

so in reality make non-deletable need address possible situation action overwrite non-editable section along situation key press delete non-editable section.

tinymce offer variety of events keypress, beforesetcontent , change catching edge cases devil in details makes hard.

if want try stop use of bspace , del can capture key presses , @ deleted , stop key press if don't want happen.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -