mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-20 22:32:36 +00:00
Merge pull request #740 from sharelatex/as-save-editor-mode
Initialise editor mode from localStorage
This commit is contained in:
commit
5b7ad8f8d8
2 changed files with 3 additions and 3 deletions
services/web/public/coffee
|
@ -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)
|
||||
|
|
|
@ -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}") == 'rich-text'
|
||||
}
|
||||
|
||||
@$scope.$on "entity:selected", (event, entity) =>
|
||||
|
|
Loading…
Reference in a new issue