Comparing version 1.1.1 to 1.1.2
@@ -0,1 +1,10 @@ | ||
# 1.1.2 | ||
- Fix setContents on already formatted text [#1065](https://github.com/quilljs/quill/issues/1065) | ||
- Fix regression [#1067](https://github.com/quilljs/quill/issues/1067) | ||
- Improve documentation [#1069](https://github.com/quilljs/quill/pull/1069) [#1070](https://github.com/quilljs/quill/pull/1070) | ||
Thank you [benbro](https://github.com/benbro), [derickruiz](https://github.com/derickruiz), [eamodio](https://github.com/eamodio), [hallaathrad](https://github.com/hallaathrad), and [philly385](https://github.com/philly385) for your contributions to this release. | ||
# 1.1.1 | ||
@@ -2,0 +11,0 @@ |
@@ -17,2 +17,5 @@ import './polyfill'; | ||
static debug(limit) { | ||
if (limit === true) { | ||
limit = 'log'; | ||
} | ||
logger.level(limit); | ||
@@ -64,2 +67,3 @@ } | ||
this.root = this.addContainer('ql-editor'); | ||
this.root.classList.add('ql-blank'); | ||
this.emitter = new Emitter(); | ||
@@ -260,10 +264,13 @@ this.scroll = Parchment.create(this.root, { | ||
return modify.call(this, () => { | ||
delta = new Delta(delta).slice(); | ||
let lastOp = delta.ops[delta.ops.length - 1]; | ||
// Quill contents must always end with newline | ||
if (lastOp == null || lastOp.insert[lastOp.insert.length-1] !== '\n') { | ||
delta.insert('\n'); | ||
delta = new Delta(delta); | ||
let length = this.getLength(); | ||
let deleted = this.editor.deleteText(0, length); | ||
let applied = this.editor.applyDelta(delta); | ||
let lastOp = applied.ops[applied.ops.length - 1]; | ||
if (lastOp != null && lastOp.insert[lastOp.insert.length-1] === '\n') { | ||
this.editor.deleteText(this.getLength() - 1, 1); | ||
applied.delete(1); | ||
} | ||
delta.delete(this.getLength()); | ||
return this.editor.applyDelta(delta); | ||
let ret = deleted.compose(applied); | ||
return ret; | ||
}, source); | ||
@@ -295,5 +302,3 @@ } | ||
return modify.call(this, () => { | ||
if (Array.isArray(delta)) { | ||
delta = new Delta(delta.slice()); | ||
} | ||
delta = new Delta(delta); | ||
return this.editor.applyDelta(delta, source); | ||
@@ -300,0 +305,0 @@ }, source, true); |
{ | ||
"name": "quill", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Your powerful, rich text editor", | ||
@@ -40,3 +40,3 @@ "author": "Jason Chen <jhchen7@gmail.com>", | ||
"parchment": "1.0.2", | ||
"quill-delta": "3.4.0" | ||
"quill-delta": "3.4.1" | ||
}, | ||
@@ -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 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
2107399
22311
+ Addedfast-diff@1.1.1(transitive)
+ Addedquill-delta@3.4.1(transitive)
- Removedfast-diff@1.3.0(transitive)
- Removedquill-delta@3.4.0(transitive)
Updatedquill-delta@3.4.1