Skip to content

docs: Document Typography block category in the GrapesJS Email Builder#838

Open
promptless-for-oss wants to merge 2 commits into
mautic:7.2from
Promptless:promptless/grapesjs-typography-blocks-7.2
Open

docs: Document Typography block category in the GrapesJS Email Builder#838
promptless-for-oss wants to merge 2 commits into
mautic:7.2from
Promptless:promptless/grapesjs-typography-blocks-7.2

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Adds a Typography blocks section to docs/builders/email_landing_page.rst covering the new Typography category (H1–H4, Subtitle), the relocated Text block, its position between Sections and Blocks (collapsed by default), instant-edit-on-drop for headings/Subtitle, Theme-token styling, and MJML-only availability, plus the sidebar screenshot. Sourced from mautic/mautic PR #15694 (7.x); targets user-documentation 7.2. Branch verified based on current origin/7.2 tip with a clean 2-file diff.

Trigger Events


Tip: Configure how Promptless handles changelogs in Agent Settings 📋

Typography blocks
*****************

When you edit an MJML Email in the GrapesJS Builder, the blocks sidebar includes a dedicated Typography category. It groups ready-made text blocks so you can add headings and body text without styling each element by hand. The Typography category sits between the Sections and Blocks categories in the sidebar. It's collapsed by default, so select it to expand the blocks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented the new Typography block category and its H1–H4/Subtitle blocks from this PR. The category label, block labels, and ordering come from Translations/en_US/javascript.ini (grapesjsbuilder.categoryTypographyLabel, grapesjsbuilder.blocks.typography.*) and the order: -0.5/open: false registration in grapesjs-mjmlThemeTokens/blocks.js, which place Typography between Sections and Blocks, collapsed by default.

Source: mautic/mautic#15694


The Text block now lives in the Typography category instead of its previous location, but it works exactly as before.

When you drag an H1, H2, H3, H4, or Subtitle block onto the canvas, Mautic opens the inline text editor and selects the placeholder text right away, so you can type over it immediately.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instant-edit-on-drop behavior for H1–H4 and Subtitle comes from grapesjs-mjmlThemeTokens/blocks.js, where each heading/subtitle block sets activate: true and a block:drag:stop listener selects the placeholder text for the typographyBlockIds set (mj-heading-1..4, mj-subtitle). The relocated Text block uses action: 'patch' without activate, so I scoped the auto-select statement to the heading and Subtitle blocks only.

Source: mautic/mautic#15694

@adiati98

Copy link
Copy Markdown
Contributor

@promptless-for-oss please rebase to 7.2 branch.

@promptless-for-oss promptless-for-oss changed the base branch from 7.1 to 7.2 July 10, 2026 18:59
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks @adiati98! The branch was already based on 7.2 — the large unrelated diff was just because the PR's base was still pointing at 7.1. I've retargeted the base to 7.2, which collapses this back down to the intended 2-file change:

  • docs/builders/email_landing_page.rst (Typography blocks section)
  • docs/builders/images/editor_typography_blocks.png (sidebar screenshot)

It should be ready for review now.

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.

2 participants