第一步:导入前端js文件

 <!-- 富文本编辑器 -->
<link rel="stylesheet" href="../plugins/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="../plugins/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="../plugins/kindeditor/lang/zh_CN.js"></script>

第二步:html页面中添加富文本编辑器输入框

 <div>kindeditor富文本编辑器</div>
<div>
<!--此处的name应与下方的editor=K.create('textarea[name="content"]')一致-->
<textarea name="content" style="width:800px;height:400px;visibility:hidden;"></textarea>
</div>

第三步:添加富文本编辑器绑定的js代码

<!-- 正文区域 /-->
<script type="text/javascript">
//定义一个全局变量
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
allowFileManager : true
});
//此处是给编辑框赋予初始值
//editor.html("123");
}); </script>

完整代码

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<!-- 富文本编辑器 -->
<link rel="stylesheet" href="../plugins/kindeditor/themes/default/default.css"/>
<script charset="utf-8" src="../plugins/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="../plugins/kindeditor/lang/zh_CN.js"></script>
</head>
<body>
<div>测试内容</div>
<div>
<!--此处的name应与下方的editor=K.create('textarea[name="content"]')一致-->
<textarea name="content" style="width:800px;height:400px;visibility:hidden;"></textarea>
</div>
</body>
<!-- 正文区域 /-->
<script type="text/javascript"> var editor;
KindEditor.ready(function (K) {
editor = K.create('textarea[name="content"]', {
allowFileManager: true
});
}); </script>
</html>

富文本编辑器kindeditor的使用的更多相关文章

  1. 富文本编辑器kindeditor配置

    <!--富文本编辑器kindeditor配置↓ --> <link type="text/css" rel="stylesheet" href ...

  2. easyUI整合富文本编辑器KindEditor详细教程(附源码)

    原因 在今年4月份的时候写过一篇关于easyui整合UEditor的文章Spring+SpringMVC+MyBatis+easyUI整合优化篇(六)easyUI与富文本编辑器UEditor整合,从那 ...

  3. python 全栈开发,Day83(博客系统子评论,后台管理,富文本编辑器kindeditor,bs4模块)

    一.子评论 必须点击回复,才是子评论!否则是根评论点击回复之后,定位到输入框,同时加入@评论者的用户名 定位输入框 focus focus:获取对象焦点触发事件 先做样式.点击回复之后,定位到输入框, ...

  4. 富文本编辑器 KindEditor 的基本使用 文件上传 图片上传

    富文本编辑器 KindEditor 富文本编辑器,Rich Text Editor , 简称 RTE , 它提供类似于 Microsoft Word 的编辑功能. 常用的富文本编辑器: KindEdi ...

  5. Django配置富文本编辑器kindeditor

    一.简介 django是一个容易快速上手的web框架,用它来创建内容驱动型的网站(比如独立博客)十分方便.遗憾的是,django并没有提供官方的富文本编辑器,而后者恰好是内容型网站后台管理中不可或缺的 ...

  6. JAVAEE——宜立方商城04:图片服务器FastDFS、富文本编辑器KindEditor、商品添加功能完成

    1. 学习计划 1.图片上传 a) 图片服务器FastDFS b) 图片上传功能实现 2.富文本编辑器的使用KindEditor 3.商品添加功能完成 2. 图片服务器的安装 1.存储空间可扩展. 2 ...

  7. Django之富文本编辑器kindeditor 及上传

    1.什么是富文本编辑器 百度百科(https://baike.baidu.com/item/%E5%AF%8C%E6%96%87%E6%9C%AC%E7%BC%96%E8%BE%91%E5%99%A8 ...

  8. java富文本编辑器KindEditor

    在页面写一个编辑框: <textarea name="content" class="form-control" id="content&quo ...

  9. 在线富文本编辑器kindeditor配置(.Net Framework 3.5)

    下载地址:http://kindeditor.net/down.php 解压放在项目要目录下, 在Bin目录下添加引用:LitJSON.dll 在页面头部加: <link rel="s ...

随机推荐

  1. MySQL语法顺序及执行顺序

    一.书写顺序 select[distinct] from join on where group by having union order by limit 二.执行顺序 from on join ...

  2. jq对象才能使用jq方法,$(".a").eq(0) 和 $(”.a“)[0]

    <a class="a"></a> <a class="a"></a> <a class="a& ...

  3. Nginx配置SSL实现HTTPS访问

    nginx配置文件如下: server { listen 443 ssl; server_name www.domain.com; root /www/web; index index.html in ...

  4. IDEA配置自己的注释

    File-->Setting-->Live Templates,点击+,选择2.Template Group... 创建Group,我的命名为MyAnnotation,然后选中MyAnnt ...

  5. springboot + 自定义配置文件读取

    新建一个配置文件 src\main\resources\resources\config.properties #自定义配置文件 #System Encoding #File Upload Temp ...

  6. 文件的内存读取 ,以及image图片(二进制)的读取

    #在python2.x中导入模块方法: from StringIO import String #在python2.x中它还有个孪生兄弟,运行速度比它快,用c实现的 from cStringIO im ...

  7. 静态Pod

    静态Pod kubernetes 除了我们常用的普通Pod外,还有一种特殊的Pod,叫静态Pod. 概念 静态Pod是直接由节点kubelet进程来管理的,不能通过apiserver的master节点 ...

  8. Python并发编程-concurrent包

    Python并发编程-concurrent包 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.concurrent.futures包概述 3.2版本引入的模块. 异步并行任务编程 ...

  9. svn 没有killall命令的解决方法 -bash: killall: command not found

    debian.ubuntu系统下:   apt-get install psmisc centos 下:   yum install psmisc

  10. 实现批量添加10个用户,用户名为user01-10,密码为user后面跟3个随机字符

    #!/bin/bash ` do user="user$i" password=$( | md5sum | ) useradd user$i echo "$user$pa ...