I have added functionality to make the input read-only, by setting the disabled variable. The disabling is accomplished by modifying contenteditable on the Summernote editor div.
Obviously, disabled=false by default, so any existing code will work fine without any changes.
To try out the disable functionality, run the example. The checkbox under the editor controls read-only mode.
Example use case:
User is drafting a post and editing isn't allowed after it has been published. You can bind the post editor using the following:
I have added functionality to make the input read-only, by setting the disabled variable. The disabling is accomplished by modifying
contenteditable
on the Summernote editor div.Obviously,
disabled=false
by default, so any existing code will work fine without any changes.To try out the disable functionality, run the example. The checkbox under the editor controls read-only mode.
Example use case:
User is drafting a post and editing isn't allowed after it has been published. You can bind the post editor using the following: