Skip to content

Commit c6f784b

Browse files
committed
Styled loader for Tiptap input component
1 parent d47a684 commit c6f784b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/packages/rte/tiptap/components/input-tiptap/input-tiptap.element.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export class UmbInputTiptapElement extends UmbFormControlMixin<string, typeof Um
9191
if (!element) return;
9292

9393
const dimensions = this.configuration?.getValueByAlias<{ width?: number; height?: number }>('dimensions');
94-
console.log(this.configuration, dimensions);
9594
if (dimensions?.width) this.setAttribute('style', `max-width: ${dimensions.width}px;`);
9695
if (dimensions?.height) element.setAttribute('style', `max-height: ${dimensions.height}px;`);
9796

@@ -120,7 +119,7 @@ export class UmbInputTiptapElement extends UmbFormControlMixin<string, typeof Um
120119
return html`
121120
${when(
122121
!this._editor && !this._extensions?.length,
123-
() => html`<uui-loader></uui-loader>`,
122+
() => html`<div id="loader"><uui-loader></uui-loader></div>`,
124123
() => html`
125124
<umb-tiptap-fixed-menu
126125
.toolbar=${this._toolbar}
@@ -140,6 +139,7 @@ export class UmbInputTiptapElement extends UmbFormControlMixin<string, typeof Um
140139
position: relative;
141140
z-index: 0;
142141
}
142+
143143
:host([readonly]) {
144144
pointer-events: none;
145145
@@ -148,6 +148,12 @@ export class UmbInputTiptapElement extends UmbFormControlMixin<string, typeof Um
148148
}
149149
}
150150
151+
#loader {
152+
display: flex;
153+
align-items: center;
154+
justify-content: center;
155+
}
156+
151157
.tiptap {
152158
height: 100%;
153159
width: 100%;

0 commit comments

Comments
 (0)