文本编辑器
文本编辑器之(KindEditor)
1.下载
官网下载: http://kindeditor.net/down.php 本地下载: http://files.cnblogs.com/files/wupeiqi/kindeditor_a5.zip
详细参数 : http://kindeditor.net/docs/option.html
2.下载后文件夹说明

3、基本使用
<textarea name="content"id="content"></textarea>
<script src="/static/jquery-1.12.4.js"></script> <script src="/static/plugins/kind-editor/kindeditor-all.js"></script> <script> $(function () { initKindEditor(); }); function initKindEditor() { var kind = KindEditor.create('#content', { width: '100%', // 文本框宽度(可以百分比或像素) height: '300px', // 文本框高度(只能像素) minWidth: 200, // 最小宽度(数字) minHeight: 400 // 最小高度(数字)uploadJson: '/kind/upload_img/', //上传路径
resizeType: 1, //文本框 是否可以调动 0不能 1 上下 2 随便
allowPreviewEmoticons: false, //图标展示 true
allowImageUpload: false, //支持本地上传true
items: [
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link'] //各种功能按钮
}); } </script>
4.常用参数
4、上传文件示例
HTML
View5、XSS过滤特殊标签
处理依赖
pip3 install beautifulsoup4
XSS示例
基于__new__实现单例模式示例
浙公网安备 33010602011771号