Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FROALA non editable content

Tags:

froala

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.

like image 804
Alejo Rybak Avatar asked Jan 30 '15 15:01

Alejo Rybak


People also ask

How do I disable Froala 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. Save this answer. Show activity on this post. <div contenteditable="false"></div>.

Is Froala editor good?

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.

How do I use Froala license key?

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.


2 Answers

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>
like image 183
st3fan Avatar answered Oct 15 '22 12:10

st3fan


For that, You can use

<div contenteditable="false"></div>.
like image 35
Alejo Rybak Avatar answered Oct 15 '22 14:10

Alejo Rybak