Now 3 shared modules (zero code duplication): - _page_editor_content.html — editor HTML (title block, slash menu, toolbar etc) - _page_editor_scripts.html — 100% original editorState() JS (CMDS, render, save, slash, database, share/publish, favorites, formatting, etc) - Used by page_editor.html (full page) and page_editor_embed.html (peek iframe) Embed page_editor_embed.html now has the exact same editor as full page. One change to _page_editor_scripts.html updates both views.
12 lines
376 B
HTML
12 lines
376 B
HTML
{% extends "base.html" %}
|
|
{% block page_title %}{{ page.title }}{% endblock %}
|
|
{# No topbar in embed mode — just the editor #}
|
|
{% block topbar %}{% endblock %}
|
|
{% block content %}
|
|
{% include '_page_editor_content.html' %}
|
|
<script>document.body.classList.add('embed-mode');</script>
|
|
{% endblock %}
|
|
{% block scripts %}
|
|
{% include '_page_editor_scripts.html' %}
|
|
{% endblock %}
|