mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
9875e55a27
GitOrigin-RevId: ec8788fdbc8aea73ca33ec2810f4e588fe9476b5
14 lines
328 B
JavaScript
14 lines
328 B
JavaScript
import App from '../../base'
|
|
|
|
App.controller('EditorLoaderController', [
|
|
'$scope',
|
|
'localStorage',
|
|
function ($scope, localStorage) {
|
|
$scope.$watch('editor.showVisual', function (val) {
|
|
localStorage(
|
|
`editor.mode.${$scope.project_id}`,
|
|
val === true ? 'rich-text' : 'source'
|
|
)
|
|
})
|
|
},
|
|
])
|