开发者

ReadOnly content in jwysiwyg editor

I was wondering if there is a way to protect a piece of html or text inside the jquery inline content editor jwysiwyg?

For example, I have a div that I externally insert to the editor and I do not want the user to modify it.

I could not capture the keypress event inside it (iframe security?) and setting the div to readonly or disabled did not work开发者_如何学Python.

Any ideas?

Thanks!


Just add a click event handler for that div so it throws an alert and disables (graying out) the rest of the page; something like a login dialog (check out jQueryUI dialog - http://jqueryui.com/demos/dialog/)


Try it! To clear the content in the editor use

$('#wysiwyg').wysiwyg('clear');

If you want to set the content of the editor on the fly you can use

$('#wysiwyg').wysiwyg('setContent' response.message);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜