quill

Quill.js: Making custom link formats -or- Custom formats with the same tag name

孤人 提交于 2021-02-19 05:45:33
问题 I'm using Quill 1.0.0-rc.1 . How can I make several different types of link formats? I've made three different types of link formats that add a data-link-type attribute. When I create the links, it's fine. However, when I reload the content into the editor using pasteHTML , the last registered format wins since the tagName s are all 'A', and so all the data-link-type s get set to resource . So this: <p>These are the links: <a href="http://www.google.com" data-link-type="external">External</a>

How do I add “show html” button in Quill like in Wysiwyg?

我与影子孤独终老i 提交于 2021-02-18 21:53:08
问题 I recently found out about Quill text editor and since I am playing with new stuff in php and javascript I decided to use it in my app instead of Wysiwyg. Quill documentation is really minimalistic though. How do I add a button that allows user to show and edit current html? Do I have to extend Quill and make one of my own? 回答1: If you check the following link, you will see that they don't add the option for an HTML button to the configuration list keys. Probably, you have to extend the

How do I add “show html” button in Quill like in Wysiwyg?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-18 21:52:43
问题 I recently found out about Quill text editor and since I am playing with new stuff in php and javascript I decided to use it in my app instead of Wysiwyg. Quill documentation is really minimalistic though. How do I add a button that allows user to show and edit current html? Do I have to extend Quill and make one of my own? 回答1: If you check the following link, you will see that they don't add the option for an HTML button to the configuration list keys. Probably, you have to extend the

How do I add “show html” button in Quill like in Wysiwyg?

拥有回忆 提交于 2021-02-18 21:52:26
问题 I recently found out about Quill text editor and since I am playing with new stuff in php and javascript I decided to use it in my app instead of Wysiwyg. Quill documentation is really minimalistic though. How do I add a button that allows user to show and edit current html? Do I have to extend Quill and make one of my own? 回答1: If you check the following link, you will see that they don't add the option for an HTML button to the configuration list keys. Probably, you have to extend the

vue PC端页面引入vue-quill-editor富文本插件

大城市里の小女人 提交于 2021-02-12 08:54:54
项目需要:在添加新类别的弹框中,要在输入框中输入多条描述信息,不同的描述信息要换行输入,输入后点击确定传给后端,接口返回成功后点击查看刚添加的新类别时,描述框中展现多条换行的描述信息也要跟填写时一样(即不同的描述换行展示),他们说用富文本比较方便,所以找到了这个插件,刚好满足我想要的功能效果,写下来当笔记。 参考文章: Vue基于vue-quill-editor富文本编辑器使用心得 安装插件: npm install vue-quill-editor 然后是在需要的组件引入,当然也可以在main.js中引入: import { quillEditor } from 'vue-quill-editor' import 'quill/dist/quill.core.css' import 'quill/dist/quill.snow.css' import 'quill/dist/quill.bubble.css' export default { data () { content: '' , editorOption: { modules: { toolbar: [ [{ 'list': 'bullet' }] // 这里我只要无序列表图标 ] }, theme: 'snow' }, }, components: { quillEditor } } HTML部分: < quill

react-quill How to do undo & redo on button click?

大城市里の小女人 提交于 2021-02-10 05:27:57
问题 I've tried by acquiring the quill object like this: got the ref from ReactQuill Component <ReactQuill ref={this.setRef}/> and then in componentDidMount got the quill object itself this.quillRef= this.reactQuillRef.getEditor(); and then I call this.quillRef.history.undo() / this.quillRef.history.redo() But there seems to be a problem with focus, kinda like ReactQuill and Quill are out of sync. When i do undo or redo sometimes it just moves the cursor. But everything works fine on ctrl + z and

react-quill How to do undo & redo on button click?

流过昼夜 提交于 2021-02-10 05:26:57
问题 I've tried by acquiring the quill object like this: got the ref from ReactQuill Component <ReactQuill ref={this.setRef}/> and then in componentDidMount got the quill object itself this.quillRef= this.reactQuillRef.getEditor(); and then I call this.quillRef.history.undo() / this.quillRef.history.redo() But there seems to be a problem with focus, kinda like ReactQuill and Quill are out of sync. When i do undo or redo sometimes it just moves the cursor. But everything works fine on ctrl + z and

Can Quill BlockEmbeds use arbitrary tags?

喜欢而已 提交于 2021-02-06 12:54:54
问题 I've got a bunch of components (pieces of html and logic) that I want to be able to embed inside a Quill document, and I'm not entirely sure how to get started. Each component has a single root element, but the tagName is arbitrary (there are aside , div , section , etc tags). Each of the components has a completely non-Quill editing experience (that's handled elsewhere), so ideally their deltas would just look like this: { ops: [ { insert: 'Hello', attributes: { bold: true } }, { insert: {

Add a custom button to the Quill's toolbar (and integrate it also on the PrimeFaces Text Editor)?

别说谁变了你拦得住时间么 提交于 2021-01-29 21:58:56
问题 I am using PrimeFaces 7 and its TextEditor component, which uses internally the free and open-source editor Quill I need to add a custom HTML button, which, when selected, inserts the word selected on the current position of the cursor in the TextEditor - (in the Quill) It is possible to add custom buttons in the Quill Editor and to attach EventListeners to them, as shown here: https://quilljs.com/docs/modules/toolbar/ (Please look at this part of the above page): var customButton = document

PrimeFaces 7.0 <p:textEditor HTML-sanitizer discards text formatting, such as centering

久未见 提交于 2021-01-28 13:52:56
问题 In PrimeFaces 8, it seems to be possible to enable / disable HMTML -sanitizer when using the <p:textEditor component by just specifying secure='false' for disabling it and secure='true' for enabling it. I tried to disable it in PrimeFaces 7.0 like this: <p:textEditor id="quillToolbarId" secure='false' widgetVar="editor2" height="300" value="#{editTemplatesBean.kaufAnbotTemplate}" placeholder="Enter your content"> but the sanitizer still seems to be working. My problem is that whenever I