百度搜索ueditor,下载,解压,把需要的JS文件放到对应的目录里,根据框架的不同目录也不一样
在文件中引入需要的JS文件
HTML代码
<div> <!-- 编辑器 --> <script id="container" name="content" type="text/plain"></script> </div>
js代码
<!-- 配置文件 --> <script type="text/javascript" src="__STATIC__/js/ueditor.config.js"></script> <!-- 编辑器源码文件 --> <script type="text/javascript" src="__STATIC__/js/ueditor.all.js"></script> <!-- 实例化编辑器 --> <script type="text/javascript"> // $(document).ready(function() { var ue = UE.getEditor('container'); // }; </script>
后台代码
$content就是文本内容
$content = input('content');
若写错了请私信我