Skip to content

Commit

Permalink
[#54649] Expose editor text in window
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejWas committed Feb 1, 2024
1 parent 2c3f9b1 commit 6183f9c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/MystEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ const MystEditor = ({

useEffect(() => hideBodyScrollIf(fullscreen), [fullscreen])

useEffect(() => {
if (!window.myst_editor) {
window.myst_editor = {};
}
window.myst_editor.text = text;
}, [text])

return html`
<div id="myst-css-namespace">
<${StyleSheetManager} stylisPlugins=${[createExtraScopePlugin('#myst-css-namespace')]}>
Expand Down

0 comments on commit 6183f9c

Please sign in to comment.