Skip to content

Commit

Permalink
(fix) Load Ace Editor
Browse files Browse the repository at this point in the history
Signed-off-by: Progyan Bhattacharya <[email protected]>
  • Loading branch information
0xTheProDev committed Mar 8, 2024
1 parent 8abf03b commit 7961a17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/lib/playground/ace-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-expect-error Module will be loaded into Global Namespace through CDN
const ace = window.ace;

export const getEditor = () => {
// @ts-expect-error Module will be loaded into Global Namespace through CDN
const ace = window.ace;

const editor = ace.edit("editor");
editor.setReadOnly(true);
editor.setTheme("ace/theme/textmate");
Expand Down
4 changes: 0 additions & 4 deletions src/pages/play/firebase-ace.astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@ import Icon from "astro-icon";

<!-- ACE and its JavaScript mode and theme files -->
<script
is:inline
src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js"
crossorigin="anonymous"></script>
<script
is:inline
src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/mode-javascript.js"
crossorigin="anonymous"></script>
<script
is:inline
src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/theme-textmate.js"
crossorigin="anonymous"></script>

Expand Down Expand Up @@ -105,7 +102,6 @@ import Icon from "astro-icon";
};

initializeApp(playgroundConfig.firebase.options);

setTimeout(onDocumentReady, 0);
</script>
</MainLayout>
1 change: 0 additions & 1 deletion src/pages/play/firebase-monaco.astro
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ import Icon from "astro-icon";
};

initializeApp(playgroundConfig.firebase.options);

setTimeout(onDocumentReady, 0);
</script>
</MainLayout>

0 comments on commit 7961a17

Please sign in to comment.