1- import { UMB_BLOCK_ENTRY_CONTEXT } from '@umbraco-cms/backoffice/block' ;
21import { css , customElement , html , property , state } from '@umbraco-cms/backoffice/external/lit' ;
32import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element' ;
3+ import { UMB_BLOCK_ENTRY_CONTEXT } from '@umbraco-cms/backoffice/block' ;
4+ import type { UmbBlockDataType } from '@umbraco-cms/backoffice/block' ;
5+
6+ import '@umbraco-cms/backoffice/ufm' ;
47
58/**
69 * @element umb-ref-list-block
@@ -11,6 +14,9 @@ export class UmbRefListBlockElement extends UmbLitElement {
1114 @property ( { type : String } )
1215 label ?: string ;
1316
17+ @state ( )
18+ _content ?: UmbBlockDataType ;
19+
1420 @state ( )
1521 _workspaceEditPath ?: string ;
1622
@@ -19,6 +25,14 @@ export class UmbRefListBlockElement extends UmbLitElement {
1925
2026 // UMB_BLOCK_LIST_ENTRY_CONTEXT
2127 this . consumeContext ( UMB_BLOCK_ENTRY_CONTEXT , ( context ) => {
28+ this . observe (
29+ context . content ,
30+ ( content ) => {
31+ this . _content = content ;
32+ } ,
33+ 'observeContent' ,
34+ ) ;
35+
2236 this . observe (
2337 context . workspaceEditContentPath ,
2438 ( workspaceEditPath ) => {
@@ -30,10 +44,11 @@ export class UmbRefListBlockElement extends UmbLitElement {
3044 }
3145
3246 override render ( ) {
33- return html `<uui- ref- node
34- stand alone
35- .name = ${ this . label ?? '' }
36- href= ${ this . _workspaceEditPath ?? '#' } > </ uui- ref- node> ` ;
47+ return html `
48+ <uui- ref- node stand alone href= ${ this . _workspaceEditPath ?? '#' } >
49+ <umb- ufm- render inline .markdown = ${ this . label } .value = ${ this . _content } > </ umb- ufm- render>
50+ </ uui- ref- node>
51+ ` ;
3752 }
3853
3954 static override styles = [
0 commit comments