@dotcms/angular 1.5.4 → 1.5.6-next.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,7 +17,7 @@ The `@dotcms/angular` SDK is the DotCMS official Angular library. It empowers An
17
17
  - [SDK Reference](#sdk-reference)
18
18
  - [DotCMSLayoutBody](#dotcmslayoutbody)
19
19
  - [DotCMSEditableText](#dotcmseditabletext)
20
- - [DotCMSBlockEditorRenderer](#dotcmsblockeditorrenderer)
20
+ - [DotCMSBlockEditorRendererNative](#dotcmsblockeditorrenderernative)
21
21
  - [DotCMSShowWhen](#dotcmsshowwhen)
22
22
  - [DotCMSEditablePageService](#dotcmseditablepageservice)
23
23
  - [Troubleshooting](#troubleshooting)
@@ -537,22 +537,28 @@ export class MyBannerComponent {
537
537
  - Detects UVE edit mode and enables inline TinyMCE editing
538
538
  - Triggers a `Save` [workflow action](https://dev.dotcms.com/docs/workflows) on blur without needing full content dialog.
539
539
 
540
- ### DotCMSBlockEditorRenderer
540
+ ### DotCMSBlockEditorRendererNative
541
541
 
542
- `DotCMSBlockEditorRenderer` is a component for rendering [Block Editor](https://dev.dotcms.com/docs/block-editor) content from dotCMS with support for custom block renderers.
542
+ `DotCMSBlockEditorRendererNative` is the recommended renderer for [Block Editor](https://dev.dotcms.com/docs/block-editor) content. It emits **clean semantic HTML** — `<ul><li><p>…</p></li></ul>` — with no custom wrapper elements between semantic tags.
543
+
544
+ > The original `DotCMSBlockEditorRenderer` is deprecated and retained for backward compatibility. See the component's TSDoc and [`MIGRATION.md`](./MIGRATION.md#migrating-to-the-semantic-block-editor-renderer) for the migration path — it's a one-line swap.
545
+
546
+ #### Why it matters
547
+
548
+ The host element is the real semantic tag (`<ul>`, `<li>`, `<p>`, `<h1>`–`<h6>`, ...) and recursion is done through `ng-template` outlets that render as HTML comment nodes (invisible to the accessibility tree), so `<li>` stays a true DOM child of `<ul>` — the relationship the HTML spec and assistive technology require, and that accessibility scanners flag when broken. This applies inside table cells and grid columns too: `<td><ul><li>…` stays intact.
543
549
 
544
550
  | Input | Type | Required | Description |
545
551
  |-------------------|----------------------|----------|------------------------------------------------------------------------------------------------------------|
546
- | `blocks` | `BlockEditorContent` | ✅ | The [Block Editor](https://dev.dotcms.com/docs/block-editor) content to render |
547
- | `customRenderers` | `CustomRenderer` | ❌ | Custom rendering functions for specific [block types](https://dev.dotcms.com/docs/block-editor#BlockTypes) |
548
- | `className` | `string` | ❌ | CSS class to apply to the container |
549
- | `style` | `CSSProperties` | ❌ | Inline styles for the container |
552
+ | `blocks` | `BlockEditorNode` | ✅ | The [Block Editor](https://dev.dotcms.com/docs/block-editor) content to render |
553
+ | `customRenderers` | `CustomRenderer` | ❌ | Custom rendering functions for specific [block types](https://dev.dotcms.com/docs/block-editor#BlockTypes) |
554
+ | `class` | `string` | ❌ | CSS class to apply to the container |
555
+ | `style` | `string \| Record<string, string>` | ❌ | Inline styles for the container |
550
556
 
551
557
  #### Usage
552
558
 
553
559
  ```typescript
554
560
  import { DotCMSBasicContentlet } from '@dotcms/types';
555
- import { DotCMSBlockEditorRenderer } from '@dotcms/angular';
561
+ import { DotCMSBlockEditorRendererNativeComponent } from '@dotcms/angular';
556
562
 
557
563
  const CUSTOM_RENDERERS = {
558
564
  customBlock: import('./custom-block.component').then((c) => c.CustomBlockComponent),
@@ -561,9 +567,9 @@ const CUSTOM_RENDERERS = {
561
567
 
562
568
  @Component({
563
569
  selector: 'app-your-component',
564
- imports: [DotCMSShowWhen],
570
+ imports: [DotCMSBlockEditorRendererNativeComponent],
565
571
  template: `
566
- <dotcms-block-editor-renderer
572
+ <dotcms-block-editor-renderer-native
567
573
  [blocks]="contentlet.myBlockEditorField"
568
574
  [customRenderers]="customRenderers()" />
569
575
  `
@@ -576,12 +582,8 @@ export class MyBannerComponent {
576
582
 
577
583
  #### Recommendations
578
584
 
579
- - Should not be used with [`DotCMSEditableText`](#dotcmseditabletext)
585
+ - Should not be used with [`DotCMSEditableText`](#dotcmseditabletext).
580
586
  - Take into account the CSS cascade can affect the look and feel of your blocks.
581
- - `DotCMSBlockEditorRenderer` only works with [Block Editor fields](https://dev.dotcms.com/docs/block-editor). For other fields, use [`DotCMSEditableText`](#dotcmseditabletext).
582
-
583
- 📘 For advanced examples, customization options, and best practices, refer to the [DotCMSBlockEditorRenderer README](https://github.com/dotCMS/core/tree/master/core-web/libs/sdk/angular/src/lib/components/DotCMSBlockEditorRenderer).
584
-
585
587
 
586
588
  ### DotCMSShowWhen
587
589