From 6ec2509624932f6661d17f8de6fd5d2a6fedce95 Mon Sep 17 00:00:00 2001
From: Blake Thomson <thomsbg@gmail.com>
Date: Fri, 7 Aug 2015 14:12:53 -0400
Subject: [PATCH] Alternative fix for #432 that also works with formats added
 via quill.addFormat()

---
 src/modules/keyboard.coffee | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/keyboard.coffee b/src/modules/keyboard.coffee
index 568b3b9371..f2bff63071 100644
--- a/src/modules/keyboard.coffee
+++ b/src/modules/keyboard.coffee
@@ -92,7 +92,7 @@ class Keyboard
     )
     _.each(['bold', 'italic', 'underline'], (format) =>
       this.addHotkey(Keyboard.hotkeys[format.toUpperCase()], (range) =>
-        if (@quill.options.formats.indexOf(format) > -1)
+        if (@quill.editor.doc.formats[format])
           this.toggleFormat(range, format)
         return false
       )