{% extends "base.html" %}

{% block title %}Edit Blog{% endblock %}

{% block content %}

<form method="POST" enctype="multipart/form-data">
    <label>Title:</label>
    <input type="text" name="title" value="{{ blogpost.title }}" required>

    <label>Content:</label>
    <textarea name="content">{{ blogpost.content|replace('<br>', '\n') }}</textarea>

    <label>Category:</label>
    <input type="text" name="category" value="{{ blogpost.category }}">

    <label>Tags:</label>
    <input type="text" name="tags" value="{{ blogpost.tags }}">


    <label>Upload New Images:</label>
    <input type="file" name="images" multiple>

    <button type="submit">Save Changes</button>
</form>



{% endblock %}
