这是你在找什么:http: //jsfiddle.net/QjBh4/
希望这符合您的需要:))
PS - 请随时使用我的演示并创建您的问题,如果我错过了什么,我会尝试帮助您!
脚本来源等。人。
<link rel="stylesheet" type="text/css" href="http://akzhan.github.com/jwysiwyg/help/lib/blueprint/screen.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="http://akzhan.github.com/jwysiwyg/help/lib/blueprint/print.css" media="print" />
<link rel="stylesheet" href="http://akzhan.github.com/jwysiwyg/jquery.wysiwyg.css" type="text/css"/>
<script type="text/javascript" src="http://akzhan.github.com/jwysiwyg/jquery.wysiwyg.js"></script>
<script type="text/javascript" src="http://akzhan.github.com/jwysiwyg/controls/wysiwyg.image.js"></script>
示例代码
(function($) {
$(document).ready(function() {
$('textarea').each(function() {
value_of_textarea = this.value;
$(this).wysiwyg({
autoGrow: true,
initialContent: function() {
return value_of_textarea;
},
controls: "bold,italic,underline,|,undo,redo"
});
});
});
})(jQuery);