quill
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -0,1 +1,10 @@ | ||
# 1.2.1 | ||
- Fix link removal on Snow theme [#1259](https://github.com/quilljs/quill/issues/1259) | ||
- Fix CMD+backspace on empty editor [#1319](https://github.com/quilljs/quill/issues/1319) | ||
- Fix disabled checklist behavior [#1312](https://github.com/quilljs/quill/issues/1312) | ||
Thank you [@danielschwartz](https://github.com/@danielschwartz), [@JedWatson](https://github.com/@JedWatson), [@montlebalm](https://github.com/@montlebalm), and [@simi](https://github.com/@simi) for contributions to this release! | ||
# 1.2.0 | ||
@@ -2,0 +11,0 @@ |
@@ -136,5 +136,2 @@ import './polyfill'; | ||
this.container.classList.toggle('ql-disabled', !enabled); | ||
if (!enabled) { | ||
this.blur(); | ||
} | ||
} | ||
@@ -141,0 +138,0 @@ |
@@ -45,4 +45,7 @@ import clone from 'clone'; | ||
} | ||
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { ctrlKey: true }, function() {}); | ||
this.addBinding({ key: Keyboard.keys.DELETE }, { ctrlKey: true }, function() {}); | ||
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange); | ||
this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: false }, handleDeleteRange); | ||
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { empty: true, shortKey: true }, handleBackspace); | ||
this.listen(); | ||
@@ -235,8 +238,9 @@ } | ||
format: { list: false }, | ||
prefix: /^(1\.|-)$/, | ||
prefix: /^\s*?(1\.|-)$/, | ||
handler: function(range, context) { | ||
if (this.quill.scroll.whitelist != null && !this.quill.scroll.whitelist['list']) return true; | ||
let length = context.prefix.length; | ||
let value = context.prefix.trim().length === 1 ? 'bullet' : 'ordered' | ||
this.quill.scroll.deleteAt(range.index - length, length); | ||
this.quill.formatLine(range.index - length, 1, 'list', length === 1 ? 'bullet' : 'ordered', Quill.sources.USER); | ||
this.quill.formatLine(range.index - length, 1, 'list', value, Quill.sources.USER); | ||
this.quill.setSelection(range.index - length, Quill.sources.SILENT); | ||
@@ -261,3 +265,3 @@ } | ||
function handleBackspace(range, context) { | ||
if (range.index === 0) return; | ||
if (range.index === 0 || this.quill.getLength() <= 1) return; | ||
let [line, ] = this.quill.getLine(range.index); | ||
@@ -264,0 +268,0 @@ let formats = {}; |
{ | ||
"name": "quill", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Your powerful, rich text editor", | ||
@@ -45,13 +45,13 @@ "author": "Jason Chen <jhchen7@gmail.com>", | ||
"babel-loader": "^6.2.10", | ||
"babel-plugin-istanbul": "^3.1.2", | ||
"babel-plugin-istanbul": "^4.0.0", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babel-preset-es2015": "^6.22.0", | ||
"css-loader": "~0.26.1", | ||
"eslint": "^3.14.0", | ||
"eslint": "^3.15.0", | ||
"eslint-loader": "^1.6.1", | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"extract-text-webpack-plugin": "^2.0.0-rc.3", | ||
"html-loader": "~0.4.4", | ||
"http-proxy": "^1.16.2", | ||
"jasmine-core": "^2.5.2", | ||
"karma": "^1.4.0", | ||
"karma": "^1.4.1", | ||
"karma-chrome-launcher": "^2.0.0", | ||
@@ -66,9 +66,9 @@ "karma-coverage": "^1.1.1", | ||
"ts-loader": "^2.0.0", | ||
"typescript": "^2.1.5", | ||
"typescript": "^2.1.6", | ||
"wdio-jasmine-framework": "~0.2.19", | ||
"wdio-spec-reporter": "~0.0.5", | ||
"webdriver-manager": "^11.1.1", | ||
"webdriverio": "^4.6.1", | ||
"webpack": "^1.14.0", | ||
"webpack-dev-server": "^1.16.2" | ||
"webdriver-manager": "^12.0.2", | ||
"webdriverio": "^4.6.2", | ||
"webpack": "^2.2.1", | ||
"webpack-dev-server": "^2.3.0" | ||
}, | ||
@@ -91,3 +91,3 @@ "license": "BSD-3-Clause", | ||
"test:unit": "npm run build; karma start _develop/karma.config.js", | ||
"test:coverage": "webpack --coverage --config _develop/webpack.config.js; karma start _develop/karma.config.js --reporters coverage", | ||
"test:coverage": "webpack --env.coverage --config _develop/webpack.config.js; karma start _develop/karma.config.js --reporters coverage", | ||
"travis": "karma start _develop/karma.config.js --reporters dots,saucelabs", | ||
@@ -94,0 +94,0 @@ "webdriver:start": "webdriver-manager start", |
@@ -225,2 +225,3 @@ import extend from 'extend'; | ||
case 'formula': { | ||
if (!value) break; | ||
let range = this.quill.getSelection(true); | ||
@@ -227,0 +228,0 @@ let index = range.index + range.length; |
@@ -79,4 +79,5 @@ import extend from 'extend'; | ||
if (this.linkRange != null) { | ||
let range = this.linkRange; | ||
this.restoreFocus(); | ||
this.quill.formatText(this.linkRange, 'link', false, Emitter.sources.USER); | ||
this.quill.formatText(range, 'link', false, Emitter.sources.USER); | ||
delete this.linkRange; | ||
@@ -83,0 +84,0 @@ } |
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
23050
2141087