Basic javascript wysiwyg editor
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can I get an explanation on how to make a wysiwyg editor using a textarea? All I need it to be able to do is parse basic html tags like bold, italics, underline, etc. It doesn't need to have any buttons that inserts it, I just want to have a default text inside the textarea tags that parse the html. Example: <textarea cols="20" rows="20" name="ok"> <b>wat</b> </textarea> This will print out <b>wat</b> instead of wat inside the textarea. Edit: jQuery is preferred 回答1: Look into the contenteditable attribute. It's supported in many modern