TQEditor使用

0.下载

http://www.e512.net/tqeditor/

1.配置

<script type="text/javascript" src="TQEditor.js" ></script>

<textarea name="content" cols="80" rows="16" id="content"></textarea>

<script type="text/javascript">
new TQEditor('content');//必须在表单域后
</script>

2.工具栏配置

<script type="text/javascript" src="../TQEditor/TQEditor.js" charset="utf-8"></script>
<link type="text/css" rel="stylesheet" href="../TQEditor/TQEditor.css" />

在js同目录下放入icon.gif

http://www.e512.net/tqeditor/demo_custom_toolbar.htm

如:new TQEditor('content',{toolbar:['bold','italic','underline','|','forecolor','backcolor','removeformat'],toolbarRight:['help']});

TQEditor使用_第1张图片 

3.得到内容

var e = new TQEditor();

e.content();

http://www.e512.net/tqeditor/demo_api.htm

你可能感兴趣的:(TQEditor使用)