!7 static S text; p { load("text"); if (isMainProgram()) serveHttpAndOpenBrowser(); } synchronized html { S newText = params.get("text"); if (newText != null) { text = newText; save("text"); } ret hpostform([[
#TEXT#
]].replace("#TEXT#", htmlencode(text) + p(hsubmit()), onSubmit := "if (editor) text.value = editor.getValue(); return true;"); }