overleaf/services/web/frontend/js/ide/toolbar/EditorToolbarController.js
Alf Eaton c8f0885316 Remove CM5 Rich Text module (#11776)
GitOrigin-RevId: 812d3b5f1df7e769c8be732ccb31653e8e9a8aa3
2023-08-16 08:03:35 +00:00

19 lines
594 B
JavaScript

import App from '../../base'
import importOverleafModules from '../../../macros/import-overleaf-module.macro'
const eModules = importOverleafModules('editorToolbarButtons')
const editorToolbarButtons = eModules.map(item => item.import.default)
export default App.controller('EditorToolbarController', ($scope, ide) => {
const editorButtons = []
for (const editorToolbarButton of editorToolbarButtons) {
const button = editorToolbarButton.button($scope, ide)
if (editorToolbarButton.source) {
editorButtons.push(button)
}
}
$scope.editorButtons = editorButtons
})