summernote富文本编辑器
下载summernote官方demo,解压,把文件夹中的summernote.js,summernote.css和font整个文件夹都放到服务器对应的项目目录里
引入summernote 所需要的bootstrap,jquery等文件,具体不知道需要引入那些文件,可以去以下网址查看,看不懂英文的话,用谷歌浏览器打开网址,右键翻译
网址:https://summernote.org/getting-started/
以下是我本地测试正常的demo
<!doctype html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
<!-- summernote富文本编辑器 -->
<link href="__STATIC__/summernote/summernote.css" rel="stylesheet">
<link href="__STATIC__/summernote/bootstrap.css" rel="stylesheet">
</head>
<body> {include file="public/header"} <div class="content">
<div class="main-wrap"> <form action="{:url('admin/index/roll_edit')}" class="parsley-validate" enctype="multipart/form-data" method="post">
<input type="text" name="id" value="{$data['id']}" class="form-control form-boxed" style="display: none;" />
<div class="form-group-col-2">
<div class="form-label">编号</div>
<div class="form-cont">
<input type="text" name="rid" value="{$data['rid']}" placeholder="编号" class="form-control form-boxed" />
<span>*此编号对应举报信息编号*</span>
</div>
</div>
<div class="form-group-col-2">
<div class="form-label">描述</div>
<div class="form-cont">
<textarea id="summernote" name="content"></textarea>
</div>
</div> <div class="form-group-col-2">
<div class="form-label"></div>
<div class="form-cont">
<input type="submit" class="btn btn-primary" value="保存"/>
</div>
</div> </div>
</div> <!--form validation js -->
<script src="__STATIC__/js/common/jquery.js"></script>
<script src="__STATIC__/js/parsley.js"></script>
<script src="__STATIC__/js/zh_cn.js"></script>
<script src="__STATIC__/layui/layui.js"></script>
<!-- summernote富文本编辑器 -->
<script src="__STATIC__/summernote/summernote.js"></script>
<!-- <script src="__STATIC__/summernote/jquery-3.3.1.min.js"></script> -->
<script src="__STATIC__/summernote/bootstrap.js"></script>
<script>
$('#summernote').summernote({
height: 300, // set editor height
width: 800,
toolbar: [
// [groupName, [list of button]]
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
],
minHeight: null, // set minimum height of editor
maxHeight: null, // set maximum height of editor
focus: true // set focus to editable area after initializing summernote
});
</script> </body>
</html>
具体还有哪些操作 可到官网查阅
summernote富文本编辑器的更多相关文章
- summernote富文本编辑器的使用
最近在开发一个微信公众号的后台,微信公众号编辑的文章一直没有得到很好地适应,大多数人也是在其他的编辑软件中编辑好之后直接去复制到微信公众平台中,考虑到复制后会排版出现问题,所以给大家推荐一款很不错的W ...
- summernote富文本编辑器配合validate表单验证无法进行表单提交的问题
1.使用summernote富文本编辑器提交图片到服务器 在使用bootstrap中,我们用到了summernote富文本编辑器,使用summernote将图片上传到服务器中,参考我的上篇文章http ...
- SummerNote 富文本编辑器 - Rails 集成
使用官方提供的CDN服务 将下面一段加入layout文件中 <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css ...
- summernote 富文本编辑器限制输入字符长度
项目中需要一个比较简单的富文本编辑器,于是选中了summernote .虽然比较轻量,但是在开发中也遇到了几个问题,在此记录一下. 1:样式和bootstrap冲突,初始化之后显示为: .note-e ...
- summernote(富文本编辑器)将附件与图片上传到自己的服务器(vue项目)
1.上传图片至自己的服务器(这个官方都有例子,重点介绍附件上传)图片上传官方网址 // onChange callback $('#summernote').summernote({ callback ...
- 【实践】简洁大方的summernote 富文本编辑器插件的用发——小技巧
前面说到summernote 的上传,可是我要知道怎么获取内容呀,很简单调用一下函数便可: 获取内容: $("#user-work-content").summernote(&qu ...
- 超好用的富文本编辑器Summernote的使用
官网地址 中文文档 源码下载地址 Summernote依赖于jquery和bootstrap3/4 所以用时记得引入这俩依赖 奉上引入方法(官网说的很清楚,api也很详细): <!-- in ...
- 在 Vue 项目中引入 tinymce 富文本编辑器
项目中原本使用的富文本编辑器是 wangEditor,这是一个很轻量.简洁编辑器 但是公司的业务升级,想要一个功能更全面的编辑器,我找了好久,目前常见的编辑器有这些: UEditor:百度前端的开源项 ...
- vue中引入Tinymce富文本编辑器
最近想在项目上引入一个富文本编辑器,之前引入过summernote,感觉并不太适合vue使用, 然后在网上查了查,vue中使用Tinymce比较适合, 首先,我们在vue项目的components文件 ...
随机推荐
- 使用日期插件用js处理日期格式
function compareDate(checkStartDate, checkEndDate) { var arys1= new Array(); var arys2= new Ar ...
- Linux 磁盘分区管理
Linux 磁盘管理进阶 磁盘分区介绍 基本分区(primary partion) 基本分区也称主分区,引导分区.每块磁盘分区主分区与扩展分区加起来不能大于四个. 基本分区创建后可以立即使用,但是有分 ...
- C#使用NPOI导出Excel
当记录数超出65536时,有两种方式处理: 一是调用WriteToDownLoad65536方法建立多个Excel. 二是调用WriteToDownLoad方法在同一个Excel中建多个Sheet. ...
- 【Git】vs code+git 不使用ssh的链接remote server的方式
git config --global user.name "dennis wu" git config --global user.email "email" ...
- IdentityServer4中AccessToken和IdentityToken中包含的Claims构成
贴出主要代码(以下源码的位置位于:IdentityServer4.Services.DefaultClaimsService) /// <summary> /// Returns clai ...
- Linux文件结构
/: 根目录,所有的目录.文件.设备都在/之下,/就是Linux文件系统的组织者,也是最上级的领导者. /bin: bin 就是二进制(binary)英文缩写.在一般的系统当中,都可以在这个目录下找到 ...
- FLEX外包团队:Flex例子DEMO源码
代码如下: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx=& ...
- JxBrowser之一:Java嵌入Chrome浏览器
1.JxBrowser是一个让Java可以轻松集成Chrome浏览器的跨平台库:一般用于网络爬虫或者网页自动化测试等. 官方网址:https://jxbrowser.support.teamdev.c ...
- JAVA多线程 总结
1. Thread 和 Runnable java.lang.Thread 类的实例就是一个线程但是它需要调用java.lang.Runnable接口来执行,由于线程类本身就是调用的Runnable接 ...
- 基于Python——实现解压文件夹中的.zip文件
[背景]当一个文件夹里存好好多.zip文件需要解压时,手动一个个解压再给文件重命名是一件很麻烦的事情,基于此,今天介绍一种使用python实现批量解压文件夹中的压缩文件并给文件重命名的方法—— [代码 ...