"Editing" user text on the fly?

I would like to implements something like vBullettin (or stackoverflow) does. When the user clicks "edit" the HTML text is converted to plain text into a <textarea></textarea> ready for the editing.

How would you implemeent something like that? Note I can use jQuery.

I would like especially know the authentication part (if users clicks "edit" on soemone else comments there is a warning)

Thanks


Check out this jQuery plugin for inline editing

http://www.appelsiini.net/projects/jeditable


How about using the built in contentEditable property? I think it's a bit cleaner than having to switch out the text for an input element. It's supported in IE6/7/8, Firefox, Safari, Chrome and Opera.

jQuery example: http://valums.com/files/2009/editableText/demo/demo.htm

链接地址: http://www.djcxy.com/p/6034.html

上一篇: 配置xml文件里面可用吗?

下一篇: 即时编辑用户文本?