flask/flaskr/templates/blog/create.html
Neo 1d75c45a1d Add markdown support to post body
Implemented markdown support in the post body to enhance
text formatting capabilities. This change allows users to
enter markdown in the create/update interface and have it
rendered as HTML in the main blog interface. The markdown
library was imported and utilized to convert markdown text
to HTML in the blog index view. Additionally, updated the
form labels to indicate markdown support and ensured safe
rendering of HTML content in the blog index template.

Issue ID: FLAS-67
2024-09-17 07:45:24 +00:00

15 lines
468 B
HTML

{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}New Post{% endblock %}</h1>
{% endblock %}
{% block content %}
<form method="post">
<label for="title">Title</label>
<input name="title" id="title" value="{{ request.form['title'] }}" required>
<label for="body">Body (Markdown supported)</label>
<textarea name="body" id="body">{{ request.form['body'] }}</textarea>
<input type="submit" value="Save">
</form>
{% endblock %}