Initialise editor mode from localStorage

This commit is contained in:
Alasdair Smith 2018-07-10 15:37:52 +01:00
parent 27ef84eb1e
commit 25b995d3b8
2 changed files with 3 additions and 3 deletions

View file

@ -136,7 +136,7 @@ define [
ide.referencesSearchManager = new ReferencesManager(ide, $scope)
ide.connectionManager = new ConnectionManager(ide, $scope)
ide.fileTreeManager = new FileTreeManager(ide, $scope)
ide.editorManager = new EditorManager(ide, $scope)
ide.editorManager = new EditorManager(ide, $scope, localStorage)
ide.onlineUsersManager = new OnlineUsersManager(ide, $scope)
if window.data.useV2History
ide.historyManager = new HistoryV2Manager(ide, $scope)

View file

@ -6,7 +6,7 @@ define [
"ide/editor/controllers/SavingNotificationController"
], (Document) ->
class EditorManager
constructor: (@ide, @$scope) ->
constructor: (@ide, @$scope, localStorage) ->
@$scope.editor = {
sharejs_doc: null
open_doc_id: null
@ -14,7 +14,7 @@ define [
opening: true
trackChanges: false
wantTrackChanges: false
showRichText: false
showRichText: localStorage("editor.mode.#{@$scope.project_id}") or false
}
@$scope.$on "entity:selected", (event, entity) =>