Skip to content

Releases: crwlrsoft/html-2-text

v0.1.1

21 Feb 22:39
Compare
Choose a tag to compare

Fixed

  • An issue that occurred when the HTML contains something that looks like a charset definition within a <script> block.

v0.1.0

26 Jan 01:28
Compare
Choose a tag to compare

Added

  • Html2Text class that converts HTML to formatted plain text.
  • DomDocumentFactory to get a DOMDocument from a string.
  • The concept of node converters: if you want to change how a certain element is converted to text, you can build a custom node converter for that element and add it to the Html2Text class (Html2Text::addConverter()). This will also replace an existing converter for that element type. You can also just remove an existing node converter without providing a new one, by calling Html2Text::removeConverter().
  • Functionality to control which elements are skipped (Html2Text::skipElement(), Html2Text::dontSkipElement()).