@webwriter/code
Version:
Write and run code as a code cell. Supports several languages (HTML/CSS/JS, TypeScript, Python).
23 lines (19 loc) • 656 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CodeWidget</title>
<link rel="stylesheet" href="./src/index.css" />
<script type="module" src="src/ww-code.ts"></script>
</head>
<body>
<webwriter-code editable>
</webwriter-code>
<form autocomplete="off"
style="position: fixed; bottom: 0; right: 0; padding: 10px; background: rgba(255, 255, 255, 0.75)">
<input checked type="checkbox"
onchange="document.querySelector('webwriter-code-cell').toggleAttribute('editable')">editable
</form>
</body>
</html>