Skip to content

v0.1.0

@mattmilesi mattmilesi tagged this 26 Apr 18:39
PHP port of mammoth.js. Functionally equivalent to mammoth for typical
real-world documents: paragraphs, headings, runs (bold/italic/strike/
sup-sub/highlight), hyperlinks, nested lists (mixed ordered/unordered),
tables (gridSpan/vMerge → colspan/rowspan, thead/tbody split),
images (embedded data URI handler + custom ImageHandler API), footnotes
and endnotes with backlinks, comments (opt-in via DSL), content controls,
symbol fonts (dingbat-to-unicode), legacy hyperlink complex fields.

Public API: Converter::convertToHtml, convertToMarkdown, extractRawText,
embedStyleMap, readEmbeddedStyleMap. CLI bin/elephant-php.

Style-mapping DSL: paragraph / run / run-property / table /
comment-reference / highlight[color] / br[type] matchers. Element paths
with .class, [attr='val'], :fresh, > nesting and ! ignore.

CI: Pint + PHPStan level 8 + Pest, on PHP 8.2 / 8.3 / 8.4 / 8.5.
306 tests, 557 assertions.

See CHANGELOG.md for the public surface and known limitations,
ROADMAP.md for the gap with mammoth.js.
Assets 2
Loading