mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Fix indentation in italics shortcut
This commit is contained in:
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user