{% extends "base.html" %} {% block content %}

Edit Topic

{{ form.hidden_tag() }}
{{ form.title(class="theme-input w-full", id="title", placeholder="Enter topic title") }}
{{ form.category(class="theme-input w-full") }}
{{ form.course(class="theme-input w-full") }} {% if topic.course_id %}
Current course ID: {{ topic.course_id }}
{% endif %} {% if form.course.errors %}
{{ form.course.errors[0] }}
{% endif %}

Reading Stage

{{ form.reading_content(class="theme-input w-full h-64", id="reading_content", placeholder="Enter the reading content for this topic...\nUse H1: and H2: for headings\nUse **text** for bold\nUse Note: for important notes") }}
{{ form.image(class="file-input file-input-bordered w-full max-w-xs", accept="image/*", onchange="previewImage(event, 'imagePreviewEdit')") }}
Image preview

Supported formats: JPG, PNG, GIF, WEBP (Max 5MB)

{% if topic.image_url %}

Current image will be replaced if you upload a new one

{% endif %}

Writing Stage

{{ form.writing_prompt(class="theme-input w-full h-24", placeholder="Enter a writing prompt (optional)...") }}

Speaking Stage

{{ form.speaking_prompt(class="theme-input w-full h-24", placeholder="Enter a speaking prompt (optional)...") }}
Cancel

Preview

{{ topic.title }}

{{ form.category.data }}

Reading Content Preview

{% if topic.reading_content %} {{ topic.reading_content }} {% else %} Your formatted reading content will appear here as you type... {% endif %}
{% endblock %}