I am using tinyMCE richtextbox in my application.
i want to give access of tinyMCE richtextbox on profile base
i.e If user is admin he can write any thing in textbox and if he is general user he can only se the content in richtextbox
This way
<script type = "text/javascript" src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script> <script type="text/javascript"> tinymce.init({ selector: 'textarea' }); var is_disabled = false; function enable_disable(btn) { is_disabled = !is_disabled; tinymce.activeEditor.getBody().setAttribute('contenteditable', !is_disabled); btn.value = is_disabled ? "Enable" : "Disable"; } </script> <textarea>Your content here.</textarea> <input type="button" value="Disable" onclick = "enable_disable(this)" />
Demo
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.