slate-angular 19.3.0 → 19.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2188,10 +2188,12 @@ class BaseLeafComponent extends BaseComponent {
|
|
|
2188
2188
|
setTimeout(() => {
|
|
2189
2189
|
const editorElement = this.nativeElement.closest('.the-editor-typo');
|
|
2190
2190
|
const editorContentHeight = getContentHeight(editorElement);
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2191
|
+
if (editorContentHeight > 0) {
|
|
2192
|
+
// Not supported webkitLineClamp exceeds height hiding
|
|
2193
|
+
placeholderElement.style.maxHeight = `${editorContentHeight}px`;
|
|
2194
|
+
}
|
|
2195
|
+
const lineClamp = Math.floor(editorContentHeight / this.nativeElement.offsetHeight) || 0;
|
|
2196
|
+
placeholderElement.style.webkitLineClamp = `${Math.max(lineClamp, 1)}`;
|
|
2195
2197
|
});
|
|
2196
2198
|
}
|
|
2197
2199
|
updatePlaceholder() {
|