diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/plugins/tiny-mce-linkpicker.plugin.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/plugins/tiny-mce-linkpicker.plugin.ts index 756772a637..85d2b1d3a4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/plugins/tiny-mce-linkpicker.plugin.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/plugins/tiny-mce-linkpicker.plugin.ts @@ -70,13 +70,13 @@ export default class UmbTinyMceLinkPickerPlugin extends UmbTinyMcePluginBase { } if (!this.#anchorElement) { - this.#openLinkPicker(); + this.#openLinkPicker({ name: this.editor.selection.getContent() }); return; } //if we already have a link selected, we want to pass that data over to the dialog const currentTarget: UmbLinkPickerLink = { - name: this.#anchorElement.title, + name: this.#anchorElement.textContent, url: this.#anchorElement.getAttribute('href') ?? '', target: this.#anchorElement.target, }; @@ -107,7 +107,7 @@ export default class UmbTinyMceLinkPickerPlugin extends UmbTinyMcePluginBase { if (!modalHandler) return; - const linkPickerData = await modalHandler.onSubmit(); + const linkPickerData = await modalHandler.onSubmit().catch(() => undefined); if (!linkPickerData) return; this.#linkPickerData = linkPickerData; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/property-editor-ui-tiny-mce.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/property-editor-ui-tiny-mce.element.ts index 9f51b697cb..2c32a2eade 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/property-editor-ui-tiny-mce.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/property-editor-ui-tiny-mce.element.ts @@ -1,4 +1,4 @@ -import { UmbTextStyles } from "@umbraco-cms/backoffice/style"; +import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { html, customElement, property } from '@umbraco-cms/backoffice/external/lit'; import { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/extension-registry'; import { UmbLitElement } from '@umbraco-cms/internal/lit-element';