|
@@ -58,6 +58,14 @@ define [
|
|
|
editor.commands.removeCommand "showSettingsMenu"
|
|
editor.commands.removeCommand "showSettingsMenu"
|
|
|
editor.commands.removeCommand "foldall"
|
|
editor.commands.removeCommand "foldall"
|
|
|
|
|
|
|
|
|
|
+ scope.$on "layout:resize", () ->
|
|
|
|
|
+ console.log "LAYOUT RESIZED"
|
|
|
|
|
+ editor.resize()
|
|
|
|
|
+
|
|
|
|
|
+ $(window).on "resize", () ->
|
|
|
|
|
+ console.log "WINDOW RESIZED"
|
|
|
|
|
+ editor.resize()
|
|
|
|
|
+
|
|
|
editor.on "changeSelection", () ->
|
|
editor.on "changeSelection", () ->
|
|
|
cursor = editor.getCursorPosition()
|
|
cursor = editor.getCursorPosition()
|
|
|
scope.$apply () ->
|
|
scope.$apply () ->
|
|
@@ -91,6 +99,9 @@ define [
|
|
|
scope.$watch "text", (text) ->
|
|
scope.$watch "text", (text) ->
|
|
|
if text?
|
|
if text?
|
|
|
editor.setValue(text, -1)
|
|
editor.setValue(text, -1)
|
|
|
|
|
+ session = editor.getSession()
|
|
|
|
|
+ session.setUseWrapMode(true)
|
|
|
|
|
+ session.setMode(new LatexMode())
|
|
|
|
|
|
|
|
scope.$watch "readOnly", (value) ->
|
|
scope.$watch "readOnly", (value) ->
|
|
|
editor.setReadOnly !!value
|
|
editor.setReadOnly !!value
|