mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
c8f0885316
GitOrigin-RevId: 812d3b5f1df7e769c8be732ccb31653e8e9a8aa3
17 lines
452 B
JavaScript
17 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'
|
|
)
|
|
})
|
|
})
|