Repository navigation
10.7.0
@dextinity/cms-admin@10.7.0
Minor Changes
-
ae93af6: Support heading-only TipTap rich text blocks
paragraphis now a feature ofcreateTipTapRichTextBlocklike the other text block types, enabled by default. Turning it off results in a heading-only block (e.g. a headline): the text block type select only offers headings, the editor starts with a heading instead of a paragraph, and content containing a paragraph is rejected during validation.The
headingoptions gain adefaultLevel, the level a newly created heading gets. It defaults to the lowest allowed level and must be one of them.migrateFromDraftJsuses it for Draft.js blocks that don't carry a heading level, so migrated content doesn't fall back to paragraphs the schema doesn't allow.Example
A headline block that only offers H2-H4 and starts with an H3:
createTipTapRichTextBlock({ paragraph: false, heading: { levels: [2, 3, 4], defaultLevel: 3 }, maxTextBlocks: 1, });
Lists are disabled in a heading-only block, because a list item's content starts with a paragraph. Enabling one explicitly throws, as does turning off
paragraphandheadingtogether, which would leave no text block type at all. -
0ba6e01: Display only warnings of the currently selected scope by default
Previously,
WarningsPageandLatestWarningsDashboardWidgetdisplayed the warnings of all scopes the user is allowed to access.
Now, they only display the warnings of the currently selected scope by default.
Switching the scope automatically updates the displayed warnings.
Warnings without a scope (e.g., DAM warnings) and warnings with a partial scope (e.g., onlydomain) remain visible.
InWarningsPage, filtering thescopecolumn is only possible withshowAllScopes, because it otherwise queries a single scope.Use the new
showAllScopesprop to restore the previous behavior:<WarningsPage showAllScopes />
<LatestWarningsDashboardWidget showAllScopes />
Patch Changes
-
33cfcdd: Fix an empty paragraph appearing after switching a block to a heading
Turning the editor's only (or last) block into a heading via the text block type dropdown left an empty paragraph behind it. This came from TipTap's
TrailingNodeextension, which inserts an empty paragraph after the last block whenever that block isn't of the schema's default type, so a document never ends on a block with no direct way to place the cursor after it. A heading doesn't need that: pressing Enter at its end already creates a paragraph below it, unlike a non-text block such as an inserted child block.createTipTapRichTextBlocknow excludes headings from that check, so switching a block to a heading (and back) no longer adds or leaves behind an extra paragraph. -
320f47a: Fix invalid HTML nesting in
textBlockStylesnode viewsTextBlockStyleParagraphandTextBlockStyleHeadingrendered their editable content in aNodeViewContent, which defaults to a<div>. Wrapped in a<p>, a heading tag, or a customelementthat renders one of those tags, this produced invalid markup (a<div>inside a<p>/heading), which React flags as a DOM nesting warning in development.NodeViewContentnow renders as a<span>, which both tags allow as content.
@dextinity/brevo-api@10.7.0
Patch Changes
-
2b42996: Add
@RootBlockEntity()and@EntityInfo()to the email campaign entityThe entity created by
createEmailCampaignEntityhas a root block (content), but was missing@RootBlockEntity(), so it wasn't picked up by the root block discovery. Blocks used inside an email campaign therefore never appeared in the block index: dependencies of the campaign's content weren't tracked, DAM files used in a campaign showed no usages, and their IDs weren't remapped when copying between scopes.@EntityInfo()was missing as well, so the campaign had no entry in theEntityInfoview. Anything referencing a campaign (dependencies and warnings) couldn't resolve a name for it and logged a warning about the missing decorator instead.The entity now uses
titleas name andsubjectas secondary information.
@dextinity/cms-api@10.7.0
Minor Changes
-
ae93af6: Support heading-only TipTap rich text blocks
paragraphis now a feature ofcreateTipTapRichTextBlocklike the other text block types, enabled by default. Turning it off results in a heading-only block (e.g. a headline): the text block type select only offers headings, the editor starts with a heading instead of a paragraph, and content containing a paragraph is rejected during validation.The
headingoptions gain adefaultLevel, the level a newly created heading gets. It defaults to the lowest allowed level and must be one of them.migrateFromDraftJsuses it for Draft.js blocks that don't carry a heading level, so migrated content doesn't fall back to paragraphs the schema doesn't allow.Example
A headline block that only offers H2-H4 and starts with an H3:
createTipTapRichTextBlock({ paragraph: false, heading: { levels: [2, 3, 4], defaultLevel: 3 }, maxTextBlocks: 1, });
Lists are disabled in a heading-only block, because a list item's content starts with a paragraph. Enabling one explicitly throws, as does turning off
paragraphandheadingtogether, which would leave no text block type at all.
@dextinity/site-react@10.7.0
Patch Changes
-
ae93af6: Treat a document with only empty headings as empty in
hasTipTapRichTextContentAn empty heading renders nothing, just like an empty paragraph, so a heading-only TipTap rich text block now shows the preview skeleton while it has no text.