{# Insert the article list sidebar as the first grid column #}
{% include 'editor/panels/_articlelist.html.twig' with {
readingLists: readingLists is defined ? readingLists : [],
recentArticles: recentArticles is defined ? recentArticles : [],
drafts: drafts is defined ? drafts : []
} %}
{# Center editor area (middle grid column) #}
{# Right sidebar (last grid column) #}
{{ form_row(form.pubkey, {'value': app.user ? app.user.userIdentifier|toHex : ''}) }}
{{ form_row(form.loginMethod, {'value': app.session.get('nostr_sign_method', '')}) }}
{{ form_end(form) }}
{# Hidden container for Nostr publishing (no JSON textarea, uses canonical panel) #}
{{ form_start(form) }}
{# Hidden field for draft status - controlled by Save Draft / Publish buttons #}
{{ form_widget(form.isDraft, {'attr': {'class': 'hidden'}}) }}
{# Hidden fields for content delta and NMD #}
{{ form_widget(form.contentDelta) }}
{# Title field at top of editor #}
{{ form_row(form.title, {
'label': false,
'attr': {'placeholder': 'Article title', 'class': 'form-control editor-title-field'}
}) }}
{# QuillJS editor container, now using content_html #}
{{ form_row(form.content_html, {'label': false}) }}
{# Mobile action buttons at bottom #}
{# Markdown editor #}
{{ form_widget(form.contentNMD) }}
{{ form_row(form.content, {'label': false, 'attr': {'class': 'form-control editor-md-field'}}) }}
{% include 'editor/panels/_json.html.twig' %}
{{ article.title|default('Article title') }}
{# Filled by JS #}
'
}) }} data-nostr--nostr-publish-target="form" data-slug="{{ article.slug|default('') }}">
{# Modal for anon user authentication choice #}