overleaf/services/web/frontend/js/ide/toolbar/EditorLoaderController.js
Alf Eaton 9875e55a27 Remove Ace (#14299)
GitOrigin-RevId: ec8788fdbc8aea73ca33ec2810f4e588fe9476b5
2023-11-29 09:04:08 +00:00

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'
)
})
},
])