I then added a new method to the same class called parseSpan:
/**
* Parse span
*
* Changes the inline style when a Span element is found.
*
* @param type $node
* @param type $element
* @param array $styles
* @return type
*/
private static function parseSpan($node, &$styles)
{
$styles['font'] = self::parseInlineStyle($node, $styles['font']);
return null;
}
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5878801-html-to-docx-inline-span-style-changes-not-recognised-with-a-solution?utm_campaign=plugin&utm_content=tracker%2F323108&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F323108&utm_medium=issues&utm_source=github).
Hi,
I had text within an HTML table cell that was styled using a
<span>
element. None of these styles were being parsed through to the phpWord DOM.I got them working by introducing a
<span>
node type in the \PhpWord\Shared\Html.php parseNode method.I then added a new method to the same class called parseSpan: