The issue this PR addresses is an intermittent one where trying to edit LaTeX code in the modal sometimes does not work properly. The ticket outlines a solution to replace the Monaco editor with a simple text editor, however I believe the root cause of this issue is related to multiple instances of the ModalDisplay component being rendered on a given page.
The ModalDisplay component is a singleton that is intended to only exist as a single instance on a given page. By rendering it one or more times on a page results in a indeterminate stacking effect where there are multiple versions of the same modal being rendered, which while related to a limitation of the monaco editor, I believe the multiple modals were actually the root case of this issue.
I clicked through the other parts of the authoring interface that may be affected by this change (Bibliography, Advanced Authoring, Flowchart, etc.) and the modals there appear to still work properly with this fix.
https://eliterate.atlassian.net/browse/MER-3156
The issue this PR addresses is an intermittent one where trying to edit LaTeX code in the modal sometimes does not work properly. The ticket outlines a solution to replace the Monaco editor with a simple text editor, however I believe the root cause of this issue is related to multiple instances of the ModalDisplay component being rendered on a given page.
The ModalDisplay component is a singleton that is intended to only exist as a single instance on a given page. By rendering it one or more times on a page results in a indeterminate stacking effect where there are multiple versions of the same modal being rendered, which while related to a limitation of the monaco editor, I believe the multiple modals were actually the root case of this issue.
https://github.com/user-attachments/assets/bc23028b-8bcf-49e0-ad6f-dd4ac847328b
I clicked through the other parts of the authoring interface that may be affected by this change (Bibliography, Advanced Authoring, Flowchart, etc.) and the modals there appear to still work properly with this fix.