Fix indentation in italics shortcut

This commit is contained in:
Mick O'Brien 2014-10-08 16:34:44 +01:00
parent b7db72e574
commit 834e27f3c5

View file

@ -97,13 +97,13 @@ define [
name: "italics",
bindKey: win: "Ctrl-I", mac: "Command-I"
exec: (editor) ->
selection = editor.getSelection()
if selection.isEmpty()
editor.insert("\\textit{}")
editor.navigateLeft(1)
else
text = editor.getCopyText()
editor.insert("\\textit{" + text + "}")
selection = editor.getSelection()
if selection.isEmpty()
editor.insert("\\textit{}")
editor.navigateLeft(1)
else
text = editor.getCopyText()
editor.insert("\\textit{" + text + "}")
readOnly: false
scope.$watch "onCtrlEnter", (callback) ->