Skip to content

✨(frontend) Optionally include title in export#1956

Open
Wqrld wants to merge 1 commit intosuitenumerique:mainfrom
Wqrld:export-document-title
Open

✨(frontend) Optionally include title in export#1956
Wqrld wants to merge 1 commit intosuitenumerique:mainfrom
Wqrld:export-document-title

Conversation

@Wqrld
Copy link

@Wqrld Wqrld commented Mar 8, 2026

Purpose

This commit introduces a checkbox in the export menu for inserting the document title.

On modal open, we check if the document contains an h1 and only precheck the checkbox if none is found. If the user overrides this checkbox, this is saved on a per-document basis.

Resolves #1837

image

Functionality

Format withTitle Title added?
PDF / DOCX / ODT / HTML true Yes
PDF / DOCX / ODT / HTML false No
Print true/false No

Discussion

Print uses a slightly different exporter which does not have a neat way of prepending a title so we just hide the checkbox there.

Please ensure the following items are checked before submitting your pull request:

  • I have read and followed the contributing guidelines
  • I have read and agreed to the Code of Conduct
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)
  • I have added corresponding tests for new features or bug fixes (if applicable)

This commit introduces a checkbox in the export menu for inserting the document title

Signed-off-by: Luc Haaijer <luc@haaijer.dev>
@Wqrld Wqrld force-pushed the export-document-title branch from bafddd5 to 08de7e8 Compare March 8, 2026 12:45
@virgile-dev
Copy link
Collaborator

Thanks for your contribution @Wqrld !
I like that checks if the fist block is a H1.
Nevertheless, I have doubts about including an element in the export that's not actually in the document content.
@rl-83 what do you think ?

@Wqrld
Copy link
Author

Wqrld commented Mar 9, 2026

Thanks for your contribution @Wqrld ! I like that checks if the fist block is a H1. Nevertheless, I have doubts about including an element in the export that's not actually in the document content. @rl-83 what do you think ?

I had the same doubts for a while, but given the current editor UI (with the title being right ontop of the editor, resulting in having the title twice right above eachother in many documents) this seems like what most people would expect. That is also what i got from the linked issue and some discussion on matrix. Given the automatic title detection it should not be intrusive to any workflows and only be an improvement.

If this path is not taken, I would choose to refactor the UI so the title is further away (a la google docs); but I obviously prefer this PR :).

@robin-lecomte
Copy link
Collaborator

My UX suggestion is not to include a checkbox and to always display the page title, exactly as Notion does.

  • Title is then displayed as an h1 title in the export
  • h1, h2, h3 inside the doc become respectively h2, h3, h4 in the export

@Wqrld
Copy link
Author

Wqrld commented Mar 10, 2026

It sounds like this would remove the option of customizing the title, which some people still want to do.

Ex: We often have the date and the logo at the top of the document, and then a centered title. But other documents are more basic and would just benefit from having a simple title in the export

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export title document

3 participants