django通过富文本编辑器发帖

在发帖的页面经常会编辑一些图片、字体、多媒体等,手动编辑这么内容比较麻烦,这样就会用到html在线编辑器

这里介绍下CKEditor和UEditor

CKEditor

首先下载CKEditor的full版本

通过CKEditor的在线帮助文档来使用CKEditor

  http://docs.ckeditor.com/#!/guide/dev_installation

将ckeditor_4.7.1_full.zip解压缩好后放到django中的静态目录中,然后在发帖的页面中导入上图中的js和添加<textarea name='editor1' id='editor1' rows= '10' cols='80'></textarea>

这样在发帖的页面显示如下:

原文地址:https://www.cnblogs.com/goser/p/7284353.html