10.2.0
@dextinity/cms-admin@10.2.0
Minor Changes
-
7f9e1f7: Add
createDamVideoBlockfactoryThe factory allows restricting what the editor can set on a video, for sites that don't use all of it.
Pass what the site supports viasupports— anything left out isn't shown in the block's admin component anymore.
Values that are already stored stay untouched, the editor just can't change them anymore.
The preview image remains part of the block's data in any case, leaving it out only hides it from the editor.supportstakes"controls"(the playback options autoplay, loop and show controls, offered together since autoplay and show controls depend on each other) and"previewImage"(the poster image).DamVideoBlockis now created with the factory and is still exported, so nothing needs to be changed in existing applications.Example
A site that renders no poster image:
import { createDamVideoBlock } from "@dextinity/cms-admin"; export const DamVideoBlock = createDamVideoBlock({ supports: ["controls"] });
A site that only reads the video file's URL, so the editor is left with just the file to choose:
export const DamVideoBlock = createDamVideoBlock({ supports: [] });
-
edf2027: Allow restricting selectable heading levels in the TipTap rich text block via a new
headingLevelsoptioncreateTipTapRichTextBlockaccepts a newheadingLevels?: number[]option to limit which heading levels (1-6) are selectable. Defaults to[1, 2, 3, 4, 5, 6], so existing usages are unaffected. Must be a non-empty array of unique integers between 1 and 6, otherwise an error is thrown.createTipTapRichTextBlock({ supports: ["heading"], headingLevels: [2, 3, 4], });
Patch Changes
-
30fad2a: Make the TipTap rich text block's toolbar sticky
The toolbar now stays fixed at the top of the editor while scrolling through longer text content, matching the previous Draft.js-based rich text editor's behavior.
@dextinity/cms-api@10.2.0
Minor Changes
-
a4ec0fe: Make the DAM's scope-based access control optional
The DAM controllers required an
AccessControlService, soDamFilesModulecouldn't be registered withoutUserPermissionsModule. The service is optional now. A DAM that has neither the service nor the option below refuses to start, because its GraphQL resolvers would serve requests unguarded.Pass
disableScopeAccessControlto run the DAM behind your own authentication guard, without any scope checks:DamFilesModule.register({ damConfig, Scope: DamScope, File: DamFile, Folder: DamFolder, disableScopeAccessControl: true, });
The option is only available on
DamFilesModule, not onDamModule, which always runs withUserPermissionsModule.Applications using
DamModuletogether withUserPermissionsModuleare unaffected: the endpoints keep using the registeredAccessControlService. -
edf2027: Allow restricting selectable heading levels in the TipTap rich text block via a new
headingLevelsoptioncreateTipTapRichTextBlockaccepts a newheadingLevels?: number[]option to limit which heading levels (1-6) are allowed, mirroring the same option added to@dextinity/cms-admin. Content with a heading level outside this set is rejected during validation. Defaults to[1, 2, 3, 4, 5, 6], so existing usages are unaffected. Must be a non-empty array of unique integers between 1 and 6, otherwise an error is thrown.createTipTapRichTextBlock({ supports: ["heading"], headingLevels: [2, 3, 4], });
@dextinity/mail-react@10.2.0
Minor Changes
-
bdd62e9: Add a
borderRadiusprop toMjmlImage,HtmlImage,MjmlPixelImageBlockandHtmlPixelImageBlockExample
<MjmlImage src="https://example.com/image.jpg" alt="Example" width={520} borderRadius={16} />
A
styleprop passed by the caller wins overborderRadius.
Patch Changes
-
f3e81aa: Round images in classic Outlook
borderRadiusonMjmlImage,HtmlImage,MjmlPixelImageBlockandHtmlPixelImageBlocknow also rounds the image in classic Outlook.Classic Outlook rounds the image only when
widthandheightare given in pixels, and the radius is given in pixels or as"50%". In every other case the image stays square in that client. -
c980b75: Fix the
MjmlButtonbackground image not reaching clients that drop<style>blocks