diff --git a/app/routers/board.py b/app/routers/board.py index a989783..7755626 100644 --- a/app/routers/board.py +++ b/app/routers/board.py @@ -752,7 +752,8 @@ async def view_page(request: Request, page_id: int): ).fetchone() ctx = {**sidebar, "page": page, "page_favorited": fav is not None, "page_share_mode": page.get("share_mode", "private"), - "page_published": bool(page.get("published", 0))} + "page_published": bool(page.get("published", 0)), + "page_data": {"id": page_id, "title": page.get("title"), "content_format": page.get("content_format", "blocks"), "content": page.get("content", ""), "favorited": fav is not None, "share_mode": page.get("share_mode", "private"), "published": bool(page.get("published", 0))}} template = env.get_template("page_editor.html") response = template.render(**ctx) return HTMLResponse(content=response, headers={"Cache-Control": "no-store, max-age=0"}) diff --git a/app/templates/page_editor.html b/app/templates/page_editor.html index f50b40b..b7555e7 100644 --- a/app/templates/page_editor.html +++ b/app/templates/page_editor.html @@ -7,7 +7,7 @@ {% endblock %} {% block content %} -