Comparing version 1.3.2 to 1.3.3
@@ -10,6 +10,6 @@ import Parchment from 'parchment'; | ||
super(node); | ||
const wrapper = document.createElement('span'); | ||
wrapper.setAttribute('contenteditable', false); | ||
[].slice.call(this.domNode.childNodes).forEach(function(childNode) { | ||
wrapper.appendChild(childNode); | ||
this.contentNode = document.createElement('span'); | ||
this.contentNode.setAttribute('contenteditable', false); | ||
[].slice.call(this.domNode.childNodes).forEach((childNode) => { | ||
this.contentNode.appendChild(childNode); | ||
}); | ||
@@ -19,3 +19,3 @@ this.leftGuard = document.createTextNode(GUARD_TEXT); | ||
this.domNode.appendChild(this.leftGuard); | ||
this.domNode.appendChild(wrapper); | ||
this.domNode.appendChild(this.contentNode); | ||
this.domNode.appendChild(this.rightGuard); | ||
@@ -22,0 +22,0 @@ } |
@@ -0,1 +1,13 @@ | ||
# 1.3.3 | ||
- Fix `getFormat` with no parameters while editor is not focused [#1548](https://github.com/quilljs/quill/issues/1548) | ||
- Remove automatic highlighting across embeds [#1691](https://github.com/quilljs/quill/issues/1691) | ||
- Support checking checklist on mobile [#1693](https://github.com/quilljs/quill/pull/1711) | ||
- Fix list creation keyboard shortcuts [#1723](https://github.com/quilljs/quill/issues/1723) | ||
- Show KaTex rendering errors [#1738](https://github.com/quilljs/quill/pull/1738) | ||
Thank you [@altschuler](https://github.com/altschuler), [@arrocke](https://github.com/arrocke), [@guillaumepotier](https://github.com/guillaumepotier), [@sferoze](https://github.com/sferoze) and [@volser](https://github.com/volser) for your contributions to this release. | ||
# 1.3.2 | ||
@@ -2,0 +14,0 @@ |
@@ -206,3 +206,3 @@ import './polyfill'; | ||
getFormat(index = this.getSelection(), length = 0) { | ||
getFormat(index = this.getSelection(true), length = 0) { | ||
if (typeof index === 'number') { | ||
@@ -209,0 +209,0 @@ return this.editor.getFormat(index, length); |
@@ -30,3 +30,2 @@ import Parchment from 'parchment'; | ||
this.handleDragging(); | ||
this.handleEmbedSelection(); | ||
this.emitter.listenDOM('selectionchange', document, () => { | ||
@@ -89,19 +88,2 @@ if (!this.mouseDown) { | ||
handleEmbedSelection() { | ||
this.emitter.on(Emitter.events.SELECTION_CHANGE, () => { | ||
const selectedNode = document.querySelector('.ql-embed-selected'); | ||
if (selectedNode) { | ||
selectedNode.classList.remove('ql-embed-selected'); | ||
} | ||
}); | ||
this.root.addEventListener('click', (e) => { | ||
const blot = Parchment.find(e.target, true); | ||
if (blot instanceof Parchment.Embed) { | ||
const range = new Range(blot.offset(scroll), blot.length()); | ||
this.setRange(range, Emitter.sources.USER); | ||
blot.domNode.classList.add('ql-embed-selected'); | ||
} | ||
}); | ||
} | ||
focus() { | ||
@@ -108,0 +90,0 @@ if (this.hasFocus()) return; |
@@ -66,3 +66,3 @@ import Parchment from 'parchment'; | ||
super(domNode); | ||
domNode.addEventListener('click', (e) => { | ||
const listEventHandler = (e) => { | ||
if (e.target.parentNode !== domNode) return; | ||
@@ -76,3 +76,6 @@ let format = this.statics.formats(domNode); | ||
} | ||
}); | ||
} | ||
domNode.addEventListener('touchstart', listEventHandler); | ||
domNode.addEventListener('mousedown', listEventHandler); | ||
} | ||
@@ -79,0 +82,0 @@ |
@@ -10,3 +10,6 @@ import Embed from '../blots/embed'; | ||
if (typeof value === 'string') { | ||
window.katex.render(value, node); | ||
window.katex.render(value, node, { | ||
throwOnError: false, | ||
errorColor: '#f00' | ||
}); | ||
node.setAttribute('data-value', value); | ||
@@ -13,0 +16,0 @@ } |
@@ -256,2 +256,4 @@ import clone from 'clone'; | ||
let length = context.prefix.length; | ||
let [line, offset] = this.quill.getLine(range.index); | ||
if (offset > length) return true; | ||
let value; | ||
@@ -273,6 +275,5 @@ switch (context.prefix.trim()) { | ||
this.quill.history.cutoff(); | ||
let [line, offset] = this.quill.getLine(range.index + 1); | ||
let delta = new Delta().retain(range.index + 1 - offset) | ||
let delta = new Delta().retain(range.index - offset) | ||
.delete(length + 1) | ||
.retain(line.length() - 1 - offset) | ||
.retain(line.length() - 2 - offset) | ||
.retain(1, { list: value }); | ||
@@ -279,0 +280,0 @@ this.quill.updateContents(delta, Quill.sources.USER); |
{ | ||
"name": "quill", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Your powerful, rich text editor", | ||
@@ -40,3 +40,3 @@ "author": "Jason Chen <jhchen7@gmail.com>", | ||
"parchment": "1.1.0", | ||
"quill-delta": "3.6.1" | ||
"quill-delta": "3.6.2" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2283868
146
24451
+ Addedfast-diff@1.1.2(transitive)
+ Addedquill-delta@3.6.2(transitive)
- Removedfast-diff@1.1.1(transitive)
- Removedquill-delta@3.6.1(transitive)
Updatedquill-delta@3.6.2