mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Fix indentation in italics shortcut
This commit is contained in:
parent
b7db72e574
commit
834e27f3c5
1 changed files with 7 additions and 7 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Reference in a new issue