From 75b9a37b6916e933877a0593c5f40842489ac1e8 Mon Sep 17 00:00:00 2001 From: Andreas Pedersen Date: Tue, 10 Jan 2017 15:43:39 -0800 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20create=20a=20list=20when=20list?= =?UTF-8?q?=20format=20is=20disabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/keyboard.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/keyboard.js b/modules/keyboard.js index 4942d509fd..c721f43074 100644 --- a/modules/keyboard.js +++ b/modules/keyboard.js @@ -233,6 +233,7 @@ Keyboard.DEFAULTS = { format: { list: false }, prefix: /^(1\.|-)$/, handler: function(range, context) { + if (this.quill.scroll.whitelist != null && !this.quill.scroll.whitelist['list']) return true; let length = context.prefix.length; this.quill.scroll.deleteAt(range.index - length, length); this.quill.formatLine(range.index - length, 1, 'list', length === 1 ? 'bullet' : 'ordered', Quill.sources.USER);