|
@@ -24,6 +24,10 @@ const sourceEditorComponents = importOverleafModules(
|
|
|
'sourceEditorComponents'
|
|
'sourceEditorComponents'
|
|
|
) as { import: { default: ElementType }; path: string }[]
|
|
) as { import: { default: ElementType }; path: string }[]
|
|
|
|
|
|
|
|
|
|
+const sourceEditorToolbarComponents = importOverleafModules(
|
|
|
|
|
+ 'sourceEditorToolbarComponents'
|
|
|
|
|
+) as { import: { default: ElementType }; path: string }[]
|
|
|
|
|
+
|
|
|
function CodeMirrorEditor() {
|
|
function CodeMirrorEditor() {
|
|
|
// create the initial state
|
|
// create the initial state
|
|
|
const [state, setState] = useState(() => {
|
|
const [state, setState] = useState(() => {
|
|
@@ -59,6 +63,11 @@ function CodeMirrorEditor() {
|
|
|
<FigureModal />
|
|
<FigureModal />
|
|
|
<CodeMirrorSearch />
|
|
<CodeMirrorSearch />
|
|
|
<CodeMirrorToolbar />
|
|
<CodeMirrorToolbar />
|
|
|
|
|
+ {sourceEditorToolbarComponents.map(
|
|
|
|
|
+ ({ import: { default: Component }, path }) => (
|
|
|
|
|
+ <Component key={path} />
|
|
|
|
|
+ )
|
|
|
|
|
+ )}
|
|
|
<CodeMirrorCommandTooltip />
|
|
<CodeMirrorCommandTooltip />
|
|
|
<ReviewPanel />
|
|
<ReviewPanel />
|
|
|
{sourceEditorComponents.map(
|
|
{sourceEditorComponents.map(
|