Skip to content

pantoken-root / formats/interactions/src / initTruncateAuto

Function: initTruncateAuto() ​

initTruncateAuto(host, target, options?): TruncateAutoHandle

Keep --lines in sync with available height for an auto-clamped truncate target.

  • CSS usage: pass the same element as host and target.
  • Web-component usage: pass custom-element host + shadow truncate target span.

Parameters ​

host ​

HTMLElement

target ​

HTMLElement

options? ​

TruncateAutoOptions

Returns ​

TruncateAutoHandle