Switching to new security rules
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
<title>{{title}}</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/@hibas123/theme@1/out/base.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/@hibas123/theme@1/out/light.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/codemirror@5.58.2/lib/codemirror.css">
|
||||
|
||||
<style>
|
||||
#message {
|
||||
@ -46,6 +47,10 @@
|
||||
{{#ifCond type "===" "textarea"}}
|
||||
<textarea class="inp" name="{{name}}" rows="20" {{disabled}}>{{value}}</textarea>
|
||||
{{/ifCond}}
|
||||
|
||||
{{#ifCond type "===" "codemirror"}}
|
||||
<textarea codemirror class="inp" name="{{name}}" rows="20" {{disabled}}>{{value}}</textarea>
|
||||
{{/ifCond}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
@ -81,6 +86,19 @@
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="https://unpkg.com/codemirror@5.58.2/lib/codemirror.js"></script>
|
||||
<script>
|
||||
document.querySelectorAll("textarea[codemirror]").forEach(elm => {
|
||||
const cm = CodeMirror.fromTextArea(elm, {
|
||||
lineNumbers: true,
|
||||
indentUnit: 3,
|
||||
tabSize: 3,
|
||||
})
|
||||
|
||||
cm.on("change", () => cm.save())
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user