富文本编辑器kindeditor的使用
第一步:导入前端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的使用的更多相关文章
- 富文本编辑器kindeditor配置
<!--富文本编辑器kindeditor配置↓ --> <link type="text/css" rel="stylesheet" href ...
- easyUI整合富文本编辑器KindEditor详细教程(附源码)
原因 在今年4月份的时候写过一篇关于easyui整合UEditor的文章Spring+SpringMVC+MyBatis+easyUI整合优化篇(六)easyUI与富文本编辑器UEditor整合,从那 ...
- python 全栈开发,Day83(博客系统子评论,后台管理,富文本编辑器kindeditor,bs4模块)
一.子评论 必须点击回复,才是子评论!否则是根评论点击回复之后,定位到输入框,同时加入@评论者的用户名 定位输入框 focus focus:获取对象焦点触发事件 先做样式.点击回复之后,定位到输入框, ...
- 富文本编辑器 KindEditor 的基本使用 文件上传 图片上传
富文本编辑器 KindEditor 富文本编辑器,Rich Text Editor , 简称 RTE , 它提供类似于 Microsoft Word 的编辑功能. 常用的富文本编辑器: KindEdi ...
- Django配置富文本编辑器kindeditor
一.简介 django是一个容易快速上手的web框架,用它来创建内容驱动型的网站(比如独立博客)十分方便.遗憾的是,django并没有提供官方的富文本编辑器,而后者恰好是内容型网站后台管理中不可或缺的 ...
- JAVAEE——宜立方商城04:图片服务器FastDFS、富文本编辑器KindEditor、商品添加功能完成
1. 学习计划 1.图片上传 a) 图片服务器FastDFS b) 图片上传功能实现 2.富文本编辑器的使用KindEditor 3.商品添加功能完成 2. 图片服务器的安装 1.存储空间可扩展. 2 ...
- 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 ...
- java富文本编辑器KindEditor
在页面写一个编辑框: <textarea name="content" class="form-control" id="content&quo ...
- 在线富文本编辑器kindeditor配置(.Net Framework 3.5)
下载地址:http://kindeditor.net/down.php 解压放在项目要目录下, 在Bin目录下添加引用:LitJSON.dll 在页面头部加: <link rel="s ...
随机推荐
- k8s与监控--k8s部署grafana6.0
原文参考:https://segmentfault.com/a/1190000018335241
- 05、MySQL—字符集
1.字符编码概念 字符(Character)是各种文字和符号的总称,包括各国家文字.标点符号.图形符号.数字等. 在计算机中所看到的任何内容都是字符构成的. 字符编码(character code)是 ...
- kafka消费者问题
[] 2019-12-17 15:40:01 - [INFO] [AbstractCoordinator:542 coordinatorDead] Marking the coordinator 机器 ...
- ASPxComboBox默认情况下不显示代码和名称,特别头疼,直到发现了关键
1.ASPxComboBox 默认不开启 AutoPostBack: 既是开启,总显示第一行(好像是个bug) 2.只好ajax,但是默认情况下不显示代码和名称,特别头疼,直到发现了关键 <dx ...
- js中cssText批量修改元素样式
平常编写代码,更改一个元素样式的时候,自己都是用 obj.style.width = "200px"; obj.style.position = "absolute&qu ...
- springCloud学习5(Spring-Cloud-Stream事件驱动)
springcloud 总集:https://www.tapme.top/blog/detail/2019-02-28-11-33 代码见文章结尾 想想平常生活中做饭的场景,在用电饭锅做饭的同时, ...
- JS中的七大数据类型
js中有7种数据类型,包括五种基本数据类型(Number,String,Boolean,Undefined,Null),和一种复杂数据类型(Object)以及es6语法新增的Symbol数据类型 es ...
- mac杂记
brew 安装.更新 https://blog.csdn.net/fxp850899969/article/details/53284193 vmware work 15 pro https://ww ...
- 如何查看服务器对外的IP
开发的时候经常会被IP受限,这是由于数据源方限制了IP,所以需要报备一下IP白名单,怎么查看自己的网络对外的IP呢? 用下面的方式最为准确: Windows上操作: 直接再浏览器访问 http://h ...
- python文字转语音
使用百度接口 接口地址 https://ai.baidu.com/docs#/TTS-Online-Python-SDK/top 安装接口 pip install baidu-aip from aip ...