Skip to content

Commit 12049e9

Browse files
authored
Tiptap cannot set the top position of the toolbar (#19087)
* Fixes #19086 by making top position a variable * #19086 Added JSDoc for cssprops
1 parent 1c1035e commit 12049e9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ import type { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/
88

99
import '../cascading-menu-popover/cascading-menu-popover.element.js';
1010

11+
/**
12+
* Provides a sticky toolbar for the {@link UmbInputTiptapElement}
13+
* @element umb-tiptap-toolbar
14+
* @cssprop --umb-tiptap-edge-border-color - Defines the edge border color
15+
* @cssprop --umb-tiptap-top - Defines the top value for the sticky toolbar
16+
*/
1117
@customElement('umb-tiptap-toolbar')
1218
export class UmbTiptapToolbarElement extends UmbLitElement {
1319
#attached = false;
@@ -108,7 +114,7 @@ export class UmbTiptapToolbarElement extends UmbLitElement {
108114
flex-direction: column;
109115
110116
position: sticky;
111-
top: -25px;
117+
top: var(--umb-tiptap-top,-25px);
112118
left: 0;
113119
right: 0;
114120
padding: var(--uui-size-3);

0 commit comments

Comments
 (0)