How to make HTML and WYSIWYG editors read only?

1,775 views
Skip to first unread message

Paul

unread,
May 25, 2011, 12:19:44 PM5/25/11
to cleditor
I can currently assign a keypress event to the $area, and make the
HTML editor not allow keystrokes... however, I cannot seem to find a
way to disable keypresses for the WYSIWYG editor.

$("textarea.wysiwyg.uneditable").cleditor()[0].
$area.keypress(function() { return false; } );
the above works for the direct HTML editor textarea.

The disable() option will not work here because it wouldn't let me
switch between the HTML and WYSIWYG views, since it disables the
toolbar, too.


Does anyone know how to assign a keypress event to the iframe, or
wherever the iframe input is?

Rollasoc

unread,
Sep 28, 2012, 11:34:46 AM9/28/12
to cled...@googlegroups.com

Why don't you just disable the control?

 
$("#mytextarea").cleditor()[0].disable("true");

Rolando Escobar

unread,
Nov 24, 2013, 11:47:05 AM11/24/13
to cled...@googlegroups.com
thank, for me working , thank... I woriking trying resize to content, do you know ? 
hablo español, sorry for me english.
Reply all
Reply to author
Forward
0 new messages