Skip to content

Commit

Permalink
feat: support auto min-height
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Aug 2, 2024
1 parent cbdedc0 commit 774cf54
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class TuiEditorStarterPageComponent {
`);

exampleText = '';
minHeight: number | null = null;
maxHeight: number | null = null;
minHeight = '';
maxHeight = '';
readOnly = false;
focusable = true;
floating = false;
Expand Down
10 changes: 4 additions & 6 deletions projects/demo/src/app/pages/starter/editor-starter.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
[pseudoHover]="pseudoHovered"
[pseudoInvalid]="pseudoInvalid"
[readOnly]="readOnly"
[style.max-height.px]="maxHeight"
[style.min-height.px]="minHeight"
[style.max-height]="maxHeight"
[style.min-height]="minHeight"
[tools]="tools"
[tuiAutoFocus]="!isE2E"
>
Expand Down Expand Up @@ -90,20 +90,18 @@ <h4>Text:</h4>
>
Floating toolbar
</ng-template>
</tui-doc-documentation>
<tui-doc-documentation heading="CSS customization">
<ng-template
documentationPropertyMode="input"
documentationPropertyName="style.minHeight.px"
documentationPropertyType="number"
documentationPropertyType="string"
[(documentationPropertyValue)]="minHeight"
>
Value of CSS-property "min-height"
</ng-template>
<ng-template
documentationPropertyMode="input"
documentationPropertyName="style.maxHeight.px"
documentationPropertyType="number"
documentationPropertyType="string"
[(documentationPropertyValue)]="maxHeight"
>
Value of CSS-property "max-height"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.ProseMirror {
min-height: 5.375rem;
min-height: 100%;
padding: 0.2rem 1rem;
outline: none;
white-space: pre-wrap;
Expand Down
4 changes: 2 additions & 2 deletions projects/tui-editor/components/editor/editor.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@

.t-scrollbar {
display: flex;
border-bottom: 0.3125rem solid transparent;
padding-bottom: 1.3125rem;
min-height: 100%;
padding-bottom: 0.75rem;
box-sizing: border-box;
flex: 1;
}
Expand Down

0 comments on commit 774cf54

Please sign in to comment.