File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 < textarea id ="ed "
4141 class ="no-scrollbar w-full bg-transparent p-2 outline-none resize-none text-[#c2c2c2] placeholder-[#404040] overflow-y-auto "
4242 spellcheck ="false "
43- placeholder ="Type your Python code here... "
44- > print("Hello, world!") </ textarea >
43+ placeholder ="Type your Python code here... ">
44+ </ textarea >
4545 </ div >
4646 </ div >
4747
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ const WASM_SOURCES = DEV
55 : [ './compiler_lib.wasm' ] ;
66const FETCH_OPTS = DEV ? { cache : 'no-store' } : undefined ;
77
8+ const DEFAULT_CODE = `def add(a: int, b: int) -> int:\n return a + b\nresult: int = add(13, 20)\nprint(result)` ;
9+
810const CLS = { ok : 'ml-auto text-[#7daf7a]' , err : 'ml-auto text-[#d67f6d]' } ;
911const MAX_LINES = 99 ;
1012const $ = ( id ) => document . getElementById ( id ) ;
@@ -67,5 +69,7 @@ ed.addEventListener('keydown', (e) => {
6769} ) ;
6870ed . oninput = ed . onscroll = sync ;
6971
72+ ed . value = DEFAULT_CODE ;
73+
7074sync ( ) ;
7175loadWasm ( ) ;
You can’t perform that action at this time.
0 commit comments