mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
18 lines
452 B
JavaScript
18 lines
452 B
JavaScript
|
import App from '../../base'
|
||
|
|
||
|
App.controller('EditorLoaderController', function ($scope, localStorage) {
|
||
|
$scope.$watch('editor.showVisual', function (val) {
|
||
|
localStorage(
|
||
|
`editor.mode.${$scope.project_id}`,
|
||
|
val === true ? 'rich-text' : 'source'
|
||
|
)
|
||
|
})
|
||
|
|
||
|
$scope.$watch('editor.newSourceEditor', function (val) {
|
||
|
localStorage(
|
||
|
`editor.source_editor.${$scope.project_id}`,
|
||
|
val === true ? 'cm6' : 'ace'
|
||
|
)
|
||
|
})
|
||
|
})
|