Created
April 26, 2025 13:04
-
-
Save fgeierst/61b8547198745d03314085aa6f916e21 to your computer and use it in GitHub Desktop.
playground-elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link | |
rel="stylesheet" | |
href="/node_modules/playground-elements/themes/neo.css" | |
/> | |
<script type="module" src="/node_modules/playground-elements/playground-ide.js" | |
></script> | |
<playground-ide | |
id="playground" | |
resizable | |
editable-file-system | |
line-numbers | |
line-wrapping | |
class="playground-theme-neo" | |
> | |
</playground-ide> | |
<script> | |
const ide = document.querySelector("playground-ide"); | |
ide.config = { | |
files: { | |
"index.html": { | |
content: `<!-- playground-hide --><script type="module" src="typescript.js"><\/script> | |
<link rel="stylesheet" href="style.css"><!-- playground-hide-end --> | |
<h1>Hello World</h1>`, | |
}, | |
"typescript.ts": { | |
content: "console.log('hello');", | |
}, | |
"style.css": { | |
content: "body { font-family: system-ui; }", | |
}, | |
}, | |
}; | |
</script> | |
<style> | |
#playground { | |
--playground-code-font-family: Roboto Mono, monospace; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment