Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
78
rated 0 times [  84] [ 6]  / answers: 1 / hits: 85246  / 12 Years ago, fri, december 14, 2012, 12:00:00

I need to disable or make readonly a tinymce textarea at runtime.


More From » jquery

 Answers
3

Use the configuration parameter readonly



tinyMCE.init({
...
theme : advanced,
readonly : 1
});


Here is a link to a demo.



Update:
What you can do to prevent users from editing content in your editor is to set the contenteditable attribute of the editors iframe body to false:



tinymce.activeEditor.getBody().setAttribute('contenteditable', false);

[#81416] Thursday, December 13, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
masonm

Total Points: 167
Total Questions: 87
Total Answers: 103

Location: Rwanda
Member since Wed, Jun 8, 2022
2 Years ago
masonm questions
;