parchment

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: {

Having problems extending Quill

可紊 提交于 2020-01-02 04:51:22
问题 I'm hitting some problems extending Quill. I want to modify the List and ListItem classes in Quill, so I tried to copy formats/list.js into my code base as a starting point. I then import my local copy and register it with Quill like so... import { List, ListItem } from './quill/list'; Quill.register({ 'formats/list': List, 'formats/list/item': ListItem }, true); However, when I attempt to create a list in the editor the code crashes in the List class with the following error: ParchmentError

Having problems extending Quill

别等时光非礼了梦想. 提交于 2019-12-05 09:03:21
I'm hitting some problems extending Quill. I want to modify the List and ListItem classes in Quill, so I tried to copy formats/list.js into my code base as a starting point. I then import my local copy and register it with Quill like so... import { List, ListItem } from './quill/list'; Quill.register({ 'formats/list': List, 'formats/list/item': ListItem }, true); However, when I attempt to create a list in the editor the code crashes in the List class with the following error: ParchmentError {message: "[Parchment] Unable to create list-item blot", name: "ParchmentError"} This happens on this