Set edit content when document doesn't exist
This commit is contained in:
parent
0397f8d2d6
commit
918f9fb294
|
@ -35,7 +35,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<form method="POST" action="/{{ path }}">
|
<form method="POST" action="/{{ path }}">
|
||||||
<textarea id="markdown-textarea" name="text">{{ content }}</textarea>
|
{% set edit_content = content %}
|
||||||
|
{% if content is none %}
|
||||||
|
{% set edit_content = '# Title\n\nContent' %}
|
||||||
|
{% endif %}
|
||||||
|
<textarea id="markdown-textarea" name="text">{{ edit_content }}</textarea>
|
||||||
<input type="submit" value="Save"/>
|
<input type="submit" value="Save"/>
|
||||||
<form>
|
<form>
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in New Issue