史上最好用的编辑器Ueditor Thinkphp
1 <html> 2 <title>Ueditor文本编辑器</title> 3 <head> 4 <title>完整demo</title> 5 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> 6 7 <load href="__PUBLIC__/Ueditor/ueditor.config.js" /> 8 <load href="__PUBLIC__/Ueditor/ueditor.all.min.js" /> 9 10 <!--使用版--> 11 <!--<script type="text/javascript" charset="utf-8" src="../ueditor.all.js"></script>--> 12 13 <!--开发版--> 14 <!--<script type="text/javascript" charset="utf-8" src="editor_api.js"> </script>--> 15 16 <!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败--> 17 <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文--> 18 <load href="__PUBLIC__/Ueditor/lang/zh-cn/zh-cn.js" /> 19 20 <style type="text/css"> 21 .clear { 22 clear: both; 23 } 24 </style> 25 </head> 26 <body> 27 <div> 28 <form name='MyForm' id='MyForm' method='POST' action="{:U('Editor/editor')}" > 29 <script id="editor" name="editor" type="text/plain" style="align:center;width:900px;height:300"> 30 31 </script> 32 <input type="submit" value="提交"/> 33 </form> 34 </div> 35 </body> 36 <script type="text/javascript"> 37 //UEDITOR_HOME_URL、config、all这三个顺序不能改变(绝对路径) 38 //window.UEDITOR_HOME_URL = "/ThinkPHP/Public/Ueditor/"; 39 //实例化编辑器 40 var ue = UE.getEditor('editor'); 41 </script>
Ueditor下载:http://ueditor.baidu.com/website/download.html#ueditor