Skip to content

Commit

Permalink
should not prepare format except as a cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed May 6, 2014
1 parent 8b496c2 commit 38fe050
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/quill.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ class Quill extends EventEmitter2
prepareFormat: (name, value) ->
format = @editor.doc.formats[name]
return unless format? # TODO warn
range = this.getSelection()
return unless range?.isCollapsed()
format.prepare(value)

setContents: (delta, source = Quill.sources.API) ->
Expand Down

0 comments on commit 38fe050

Please sign in to comment.