From ebe93fbbac1c9a08be5d409ed6ea6e9ca7a3f247 Mon Sep 17 00:00:00 2001 From: Markus Johansson Date: Mon, 5 May 2025 07:55:52 +0200 Subject: [PATCH] Tiptap cannot set the top position of the toolbar (#19087) * Fixes #19086 by making top position a variable * #19086 Added JSDoc for cssprops (cherry picked from commit 12049e9c03e95338bb38b756bd4033bc1afe1e54) --- .../components/input-tiptap/tiptap-toolbar.element.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.ts index 44ffd238b2..78aeb69f79 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.ts @@ -8,6 +8,12 @@ import type { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/ import '../cascading-menu-popover/cascading-menu-popover.element.js'; +/** +* Provides a sticky toolbar for the {@link UmbInputTiptapElement} +* @element umb-tiptap-toolbar +* @cssprop --umb-tiptap-edge-border-color - Defines the edge border color +* @cssprop --umb-tiptap-top - Defines the top value for the sticky toolbar +*/ @customElement('umb-tiptap-toolbar') export class UmbTiptapToolbarElement extends UmbLitElement { #attached = false; @@ -108,7 +114,7 @@ export class UmbTiptapToolbarElement extends UmbLitElement { flex-direction: column; position: sticky; - top: -25px; + top: var(--umb-tiptap-top,-25px); left: 0; right: 0; padding: var(--uui-size-3);