quill

Vue-Quill-Editor在vue中自定义选择视频插入编辑文章中

匆匆过客 提交于 2020-02-25 16:20:59
> vue-quill-editor 是 Vue 项目中使用的 富文本编辑器 1 引言 在实际应用开发中,在常见的管理后台或者是多媒体管理后台,多多少少都会有富文本编辑器,而在编辑富文本时,通常的一个需求就是在富文本中插入图片或者视频,本篇文章讲述的就是在 vue 项目中,使用 Vue-Quill-Editor 编辑器在富文本中插入视频。 官方的效果如下图1所示 点击这里查看Vue-Quill-Editor官方效果 图1 在实际应用开发中,官方提供的效果往往满足不了我们的效果,而通过我们自定义样式后,达到如下的效果 图2 2 一步步实现我们上面的效果 在实际项目中,我们有引用到 quill-editor 的地方,如这里写的 <quill-editor class="editer" ref="editer" v-model="dataForm.content" :options="editorOption" style="height: 500px;"> </quill-editor> > 在 vue 中 ref 用来给元素或者子组件 注册引用信息,引用信息会注册在父组件的 refs对象中,也就是说 我们可以通过 this.refs.editer 来获取当前 quill-editor 的实例 在这里 quill-editor 有一个配置信息 editorOption

How to paste plain text in a Quill-based editor

ぐ巨炮叔叔 提交于 2020-02-21 12:00:48
问题 Quill (https://quilljs.com/) makes it simple to embed a quality text editor in a web page. When pasting html content in the editor, it filters the pasted html and then puts it into the text editor. My question is: How can I configure Quill so it pastes only plain text in the text editor? It would filter out all tags and leave the plain text only. The documentation about the Clipboard module (http://quilljs.com/docs/modules/clipboard/) says that it is possible to add custom Matchers to the

Quill JavaScript Rich Text Editor restrict tags

谁说胖子不能爱 提交于 2020-01-25 07:03:13
问题 I'm trying to use Quill JavaScript Rich Text Editor. I need to configure it to use only a predefined tag set: b, i, pre, a, br + Emoji Right now I have configured it in the following way: var Block = Quill.import('blots/block'); Block.tagName = 'PRE'; Quill.register(Block, true); var quill = new Quill('#editor-container', { modules: { toolbar: true }, theme: 'snow' }); As you may see I already have changed the wrapper to PRE tag. How to also configure Quill to use the mentioned restricted tag

Quill JavaScript Rich Text Editor restrict tags

隐身守侯 提交于 2020-01-25 07:03:12
问题 I'm trying to use Quill JavaScript Rich Text Editor. I need to configure it to use only a predefined tag set: b, i, pre, a, br + Emoji Right now I have configured it in the following way: var Block = Quill.import('blots/block'); Block.tagName = 'PRE'; Quill.register(Block, true); var quill = new Quill('#editor-container', { modules: { toolbar: true }, theme: 'snow' }); As you may see I already have changed the wrapper to PRE tag. How to also configure Quill to use the mentioned restricted tag

Why does Quill filter it's content?

有些话、适合烂在心里 提交于 2020-01-21 19:24:08
问题 When I use QuillJs to edit an existing HTML document, it removes the comments, indentations etc of the original HTML. Is there anyway to prevent this? 回答1: Quill does not support arbitrary HTML. By default, anything that is not recognized will be converted (the <strong> tag to the <b> tag) when possible, or removed when not. In Quill configuration options, use the configuration named formats . The formats defined in this property will create a whitelist , where anything not in it will be

Why does Quill filter it's content?

烂漫一生 提交于 2020-01-21 19:24:06
问题 When I use QuillJs to edit an existing HTML document, it removes the comments, indentations etc of the original HTML. Is there anyway to prevent this? 回答1: Quill does not support arbitrary HTML. By default, anything that is not recognized will be converted (the <strong> tag to the <b> tag) when possible, or removed when not. In Quill configuration options, use the configuration named formats . The formats defined in this property will create a whitelist , where anything not in it will be

this is pointing to the quill editor toolbar

南笙酒味 提交于 2020-01-15 11:47:27
问题 I use Quilljs for a textarea on my website. The standard editor don't support image upload to the server, so i have to implement a custom handler. In the documentation is written the following: Handler functions will be bound to the toolbar (so using this will refer to the toolbar instance) and passed the value attribute of the input if the corresponding format is inactive, and false otherwise. This is actually a problem for me and i dont know how to resolve it in a clean and "right" way. I

How to create undo/redo buttons in Quill JS (react-quill)?

拥有回忆 提交于 2020-01-15 04:42:33
问题 QuillJS doesn't come with default undo/redo buttons. I'm trying to add them to the toolbar. Quill has a folder with the undo/redo icons saved. In the node_modules, there's also undo() and redo() functions. I'm kind of new to coding and don't know how to access these things and make them work. I'm using React. Here's my code so far: import ReactQuill from 'react-quill'; import 'react-quill/dist/quill.snow.css'; import 'react-quill/dist/quill.bubble.css'; class QuillTextEditor extends Component

How to create undo/redo buttons in Quill JS (react-quill)?

浪子不回头ぞ 提交于 2020-01-15 04:41:13
问题 QuillJS doesn't come with default undo/redo buttons. I'm trying to add them to the toolbar. Quill has a folder with the undo/redo icons saved. In the node_modules, there's also undo() and redo() functions. I'm kind of new to coding and don't know how to access these things and make them work. I'm using React. Here's my code so far: import ReactQuill from 'react-quill'; import 'react-quill/dist/quill.snow.css'; import 'react-quill/dist/quill.bubble.css'; class QuillTextEditor extends Component

How can I add a align buttons to the toolbar in Quill?

百般思念 提交于 2020-01-04 05:46:10
问题 I'm trying to add alignment buttons to the Quill editor toolbar. The toolbar documentation isn't very detailed. It shows how to have a select for the alignment options but I'd like a set of toggle buttons side-by-side. Is this possible? 回答1: You can do align: 'center' , similar to the header: 3 example in the docs. Here's a working example: https://codepen.io/anon/pen/PKdEgN var quill = new Quill('#editor-container', { modules: { toolbar: [ [{ align: '' }, { align: 'center' }, { align: 'right