Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
fb3d37e25c
commit
92a06fb740
6 changed files with 20 additions and 2 deletions
|
@ -58,11 +58,15 @@
|
|||
</div>
|
||||
|
||||
<div class="container mb-4">
|
||||
{{if .DisableEditor}}
|
||||
<textarea class="form-control" id="content" name="content" cols="40" rows="12"></textarea>
|
||||
{{else}}
|
||||
<div class="row">
|
||||
<div id="editor" name="editor" class="form-control"
|
||||
style="height: 300px; resize: vertical; overflow: auto;"></div>
|
||||
<input type="hidden" id="content" />
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="container mb-4">
|
||||
<div class="row text-center justify-content-center">
|
||||
|
@ -71,6 +75,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if eq false .DisableEditor}}
|
||||
<script
|
||||
src="{{if .AceDirectory}}/static/ace-builds{{else}}https://cdn.jsdelivr.net/npm/ace-builds@1.43.3{{end}}/src-noconflict/ace.js"
|
||||
type="text/javascript" charset="utf-8"></script>
|
||||
|
@ -103,6 +108,7 @@
|
|||
e.formData.append('content', editor.getValue());
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
</form>
|
||||
|
||||
{{block "footer" .}}{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue