@@ -66,7 +66,7 @@ export class UmbBlockRteEntryElement extends UmbLitElement implements UmbPropert
66
66
_workspaceEditSettingsPath ?: string ;
67
67
68
68
@state ( )
69
- _contentElementTypeAlias ?: string ;
69
+ _contentTypeAlias ?: string ;
70
70
71
71
@state ( )
72
72
_contentTypeName ?: string ;
@@ -115,7 +115,7 @@ export class UmbBlockRteEntryElement extends UmbLitElement implements UmbPropert
115
115
this . observe (
116
116
this . #context. contentElementTypeAlias ,
117
117
( alias ) => {
118
- this . _contentElementTypeAlias = alias ;
118
+ this . _contentTypeAlias = alias ;
119
119
} ,
120
120
null ,
121
121
) ;
@@ -230,7 +230,7 @@ export class UmbBlockRteEntryElement extends UmbLitElement implements UmbPropert
230
230
}
231
231
232
232
readonly #filterBlockCustomViews = ( manifest : ManifestBlockEditorCustomView ) => {
233
- const elementTypeAlias = this . _contentElementTypeAlias ?? '' ;
233
+ const elementTypeAlias = this . _contentTypeAlias ?? '' ;
234
234
const isForBlockEditor =
235
235
! manifest . forBlockEditor || stringOrStringArrayContains ( manifest . forBlockEditor , UMB_BLOCK_RTE ) ;
236
236
const isForContentTypeAlias =
@@ -256,23 +256,25 @@ export class UmbBlockRteEntryElement extends UmbLitElement implements UmbPropert
256
256
} ;
257
257
258
258
#renderBlock( ) {
259
- return html `
260
- <div class= "uui-text uui-font" >
261
- <umb- extension- slot
262
- type= "blockEditorCustomView"
263
- default-element = "umb-ref-rte-block"
264
- .renderMethod = ${ this . #extensionSlotRenderMethod}
265
- .props = ${ this . _blockViewProps }
266
- .filter = ${ this . #filterBlockCustomViews}
267
- single>
268
- ${ this . #renderRefBlock( ) }
269
- </ umb- extension- slot>
270
- <uui- action- bar> ${ this . #renderEditAction( ) } ${ this . #renderEditSettingsAction( ) } </ uui- action- bar>
271
- ${ ! this . _showContentEdit && this . _contentInvalid
272
- ? html `<uui- badge attention color = "danger" label = "Invalid content" > !</ uui- badge> `
273
- : nothing }
274
- </ div>
275
- ` ;
259
+ return this . contentKey && this . _contentTypeAlias
260
+ ? html `
261
+ <div class= "uui-text uui-font" >
262
+ <umb- extension- slot
263
+ type= "blockEditorCustomView"
264
+ default-element = "umb-ref-rte-block"
265
+ .renderMethod = ${ this . #extensionSlotRenderMethod}
266
+ .props = ${ this . _blockViewProps }
267
+ .filter = ${ this . #filterBlockCustomViews}
268
+ single>
269
+ ${ this . #renderRefBlock( ) }
270
+ </ umb- extension- slot>
271
+ <uui- action- bar> ${ this . #renderEditAction( ) } ${ this . #renderEditSettingsAction( ) } </ uui- action- bar>
272
+ ${ ! this . _showContentEdit && this . _contentInvalid
273
+ ? html `<uui- badge attention color = "danger" label = "Invalid content"> !</ uui- badge> `
274
+ : nothing }
275
+ </ div>
276
+ `
277
+ : nothing ;
276
278
}
277
279
278
280
#renderRefBlock( ) {
0 commit comments