Skip to content

Commit

Permalink
fix #1818
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Jan 22, 2018
1 parent 4da2651 commit 242e166
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ Keyboard.DEFAULTS = {
format: { list: 'checked' },
handler: function(range) {
let [line, offset] = this.quill.getLine(range.index);
let formats = extend({}, line.formats(), { list: 'checked' });
let delta = new Delta().retain(range.index)
.insert('\n', { list: 'checked' })
.insert('\n', formats)
.retain(line.length() - offset - 1)
.retain(1, { list: 'unchecked' });
this.quill.updateContents(delta, Quill.sources.USER);
Expand Down

0 comments on commit 242e166

Please sign in to comment.