I am building an email template with FROALA. I don't want to give the user the power to edit a part of it. Is there a way to stop the user from editing a part of the content?
Thank you.
The best way for that would be to use the contenteditable=false flag and there is an example on the Froala Github repo as well: https://github.com/froala/wysiwyg-editor/blob/master/html/popular/disable_edit.html#L40. Save this answer. Show activity on this post. <div contenteditable="false"></div>.
Froala editor is one of the most powerful Javascript editors in every aspect: It initializes in less than 40 seconds. It is lightweight to ensure optimum loading speed. It is well-structured and practically bulletproof in terms of security.
Once you purchase a license, you can request license keys from [email protected] or use the keys sent to the email used at the time of purchase. To activate the license, pass the generated activation key as an option when initializing the editor.
The best way for that would be to use the contenteditable=false
flag and there is an example on the Froala Github repo as well: https://github.com/froala/wysiwyg-editor/blob/master/html/popular/disable_edit.html#L40.
<p>This <span contenteditable="false">zone</span> can't be edited.</p>
If you would like to allow deleting that when using backspace/delete, then you should also add the class fr-deletable
to it:
<p>This <span contenteditable="false" class="fr-deletable">zone</span> can be deleted.</p>
For that, You can use
<div contenteditable="false"></div>.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With