# `PhoenixKitEcommerce.HtmlText`
[🔗](https://github.com/BeamLabEU/phoenix_kit_ecommerce/blob/0.5.10/lib/phoenix_kit_ecommerce/html_text.ex#L1)

Plain-text extraction from HTML.

Shared between the Shopify CSV importer (`Import.ProductTransformer`) and
the Shopify Admin API sync (`Shopify.ProductDiff`), so both derive a
product's `description` from `body_html` the same way.

# `extract_description`

```elixir
@spec extract_description(String.t() | nil, pos_integer()) :: String.t() | nil
```

Strips tags from `html`, collapses whitespace, and truncates to `limit`
characters (default 500). Returns `nil` for `nil`/`""` input.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
