Skip to content

Commit 543b644

Browse files
NguyenThuyLanLan Nguyen Thuy
andauthored
Fix issue forceHideContentEditorInOverlay not available in RTE (#19698)
* Fix issue forceHideContentEditorInOverlay not available in RTE * remove href link when enable hide content editor setting: --------- Co-authored-by: Lan Nguyen Thuy <[email protected]>
1 parent e6c169e commit 543b644

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ export class UmbBlockRteEntryElement extends UmbLitElement implements UmbPropert
301301
.icon=${this._icon}
302302
.unpublished=${!this._exposed}
303303
.content=${this._blockViewProps.content}
304-
.settings=${this._blockViewProps.settings}></umb-ref-rte-block>`;
304+
.settings=${this._blockViewProps.settings}
305+
.config=${this._blockViewProps.config}></umb-ref-rte-block>`;
305306
}
306307

307308
#renderEditAction() {

src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { css, customElement, html, property, state } from '@umbraco-cms/backoffi
22
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
33
import { UMB_BLOCK_ENTRY_CONTEXT } from '@umbraco-cms/backoffice/block';
44
import type { UmbBlockDataType } from '@umbraco-cms/backoffice/block';
5+
import type { UmbBlockEditorCustomViewConfiguration } from '@umbraco-cms/backoffice/block-custom-view';
56

67
/**
78
* @element umb-ref-rte-block
@@ -27,6 +28,9 @@ export class UmbRefRteBlockElement extends UmbLitElement {
2728
@state()
2829
_workspaceEditPath?: string;
2930

31+
@property({ attribute: false })
32+
config?: UmbBlockEditorCustomViewConfiguration;
33+
3034
constructor() {
3135
super();
3236

@@ -44,7 +48,7 @@ export class UmbRefRteBlockElement extends UmbLitElement {
4448
override render() {
4549
const blockValue = { ...this.content, $settings: this.settings };
4650
return html`
47-
<uui-ref-node standalone href=${this._workspaceEditPath ?? '#'}>
51+
<uui-ref-node standalone href=${(this.config?.showContentEdit ? this._workspaceEditPath : undefined) ?? ''}>
4852
<umb-icon slot="icon" .name=${this.icon}></umb-icon>
4953
<umb-ufm-render slot="name" inline .markdown=${this.label} .value=${blockValue}></umb-ufm-render>
5054
</uui-ref-node>

src/Umbraco.Web.UI.Client/src/packages/block/block-rte/workspace/views/block-rte-type-workspace-view.element.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ export class UmbBlockRteTypeWorkspaceViewSettingsElement extends UmbLitElement i
7575
},
7676
]}></umb-property>
7777
</uui-box>
78+
<uui-box headline=${this.localize.term('blockEditor_headlineAdvanced')}>
79+
<umb-property
80+
label=${this.localize.term('blockEditor_forceHideContentEditor')}
81+
alias="forceHideContentEditorInOverlay"
82+
description=${this.localize.term('blockEditor_forceHideContentEditorHelp')}
83+
property-editor-ui-alias="Umb.PropertyEditorUi.Toggle"></umb-property>
84+
</uui-box>
7885
`;
7986
}
8087

0 commit comments

Comments
 (0)