quill

Is it possible to extend quill to support a <br> inside of an <li>?

感情迁移 提交于 2021-01-28 11:47:09
问题 I would like to be able to achieve something like the following in Quill: <ul> <li>Something<br> Else </li> </ul> Out of the box, Quill removes the br and does not support adding a br inside of an li with either insertText(..., '\n', ...) or user editing. I see how I can register a keyboard binding to handle, for example, "shift-enter" to be able to author content like this and it seems like both something that is possible to represent in Parchment and that there are the Blots to represent

Is it possible to extend quill to support a <br> inside of an <li>?

*爱你&永不变心* 提交于 2021-01-28 11:39:26
问题 I would like to be able to achieve something like the following in Quill: <ul> <li>Something<br> Else </li> </ul> Out of the box, Quill removes the br and does not support adding a br inside of an li with either insertText(..., '\n', ...) or user editing. I see how I can register a keyboard binding to handle, for example, "shift-enter" to be able to author content like this and it seems like both something that is possible to represent in Parchment and that there are the Blots to represent

insert HTML with style into a QuillJS?

荒凉一梦 提交于 2021-01-28 04:23:38
问题 How to insert html with style (css) to quillJS. I have html like: var data = '<p style="color: #f00">tesst</p>'; or var data = '<style> .pp { color: #0f0;} </style> <p class="pp">tesst</p>'; i paste it by quill_arr[$('#docbody').attr('quill-id')].clipboard.dangerouslyPasteHTML(data); text load but format is: <p>tesst</p> without all styles. Please help. 回答1: Putting a <span> with the styles inside a <p> seemed to work. var data = '<p><span style="color: red;">test</span></p>' quill.clipboard

HTML富文本编辑器

南笙酒味 提交于 2021-01-13 20:57:51
https://summernote.org/ 缺点:太重了 bootstrap + jquery https://www.layui.com/doc/modules/layedit.html 缺点:比较简陋 https://github.com/quilljs/quill 来源: oschina 链接: https://my.oschina.net/u/2400070/blog/4897743

How to make quill editor required?

狂风中的少年 提交于 2021-01-03 05:01:59
问题 How to make the quill editor field required? The editor gets rendered into a div, but it isn't clear if there is a way to make the field/editor required when the form submits. 回答1: As you wrote, Quill works with a div and not with a form element so it can't help you with form validation. You'll need to check manually if the editor's content is empty, prevent the user from submitting the form and show a message that this field is required. You can copy quill contents to a hidden input element

How to make quill editor required?

旧街凉风 提交于 2021-01-03 05:01:31
问题 How to make the quill editor field required? The editor gets rendered into a div, but it isn't clear if there is a way to make the field/editor required when the form submits. 回答1: As you wrote, Quill works with a div and not with a form element so it can't help you with form validation. You'll need to check manually if the editor's content is empty, prevent the user from submitting the form and show a message that this field is required. You can copy quill contents to a hidden input element

How to make quill editor required?

随声附和 提交于 2021-01-03 05:01:07
问题 How to make the quill editor field required? The editor gets rendered into a div, but it isn't clear if there is a way to make the field/editor required when the form submits. 回答1: As you wrote, Quill works with a div and not with a form element so it can't help you with form validation. You'll need to check manually if the editor's content is empty, prevent the user from submitting the form and show a message that this field is required. You can copy quill contents to a hidden input element

How to make quill editor required?

你说的曾经没有我的故事 提交于 2021-01-03 05:00:40
问题 How to make the quill editor field required? The editor gets rendered into a div, but it isn't clear if there is a way to make the field/editor required when the form submits. 回答1: As you wrote, Quill works with a div and not with a form element so it can't help you with form validation. You'll need to check manually if the editor's content is empty, prevent the user from submitting the form and show a message that this field is required. You can copy quill contents to a hidden input element

vue-quill-editor html编辑器

故事扮演 提交于 2020-12-24 05:14:05
在Vue项目使用quill-editor带样式编辑器(更改插入图片和视频) https://www.cnblogs.com/zhengweijie/p/7305903.html vue-quill-editor默认插入图片是直接将图片转为base64再放入内容中,如果图片比较大的话,富文本的内容就会很大。 插入视频是直接弹框输入URL地址,某些需求下我们需要让用户去本地选择自己的视频,我们可以通过 vue-quill-editor 内部的某些方法进行更改 该方法使用了 element-ui 和 文件上传七牛 一、npm 安装 vue-quill-editor 二、在main.js中引入 import VueQuillEditor from 'vue-quill-editor' Vue.use(VueQuillEditor) HTML部分:为编辑器绑定各个API事件,定义一个隐藏的input框,用于点击图片或者视频图标上传文件 <template> <div> <!-- quill-editor插件标签 分别绑定各个事件--> <quill-editor v-model="content" ref="myQuillEditor" :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus(

7.Vue-Quill-Editor图片插入自定义

一世执手 提交于 2020-12-19 02:55:02
Vue-Quill-Editor图片插入自定义 前言: 因为在项目中前端采用了Vue来实现,正好用到了富文本编辑器这一块,于是,经过技术上的选择,决定使用Vue-Quill-Editor。 使用的过程相对简单,但是图片插入时,保留的是base64二进制形式,会导致数据库字段太长,存储不易。 所以再三斟酌,决定使用Element-UI的Upload插件来进行图片的上传。 代码: <template> <div class="bg"> <!-- 图片上传组件辅助--> <el-upload class="avatar-uploader" :action="serverUrl" :headers="header" :show-file-list="false" :on-success="uploadSuccess" :on-error="uploadError" :before-upload="beforeUpload"> </el-upload> <quill-editor class="editor" v-model="content" ref="myQuillEditor" :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)" @change=