Signed-off-by: Jean Privat <jean@pryen.org>
page.add """
<!doctype html><html><head>{{{hl.head_content}}}
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.16.0/codemirror.css">
<style>
{{{hl.css_content}}}
textarea {width:100%;}
end
page.add hl.foot_content
+
+ # Call codemirror
page.add """
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.16.0/codemirror.min.js"></script>
+ <script>
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+ lineNumbers: true
+ });
+ </script>
</body></html>
"""