NightWhistler/HtmlSpanner

inline style not working

Closed this issue · 1 comments

I want to give inline styling using HtmlSpanner.
<span style="background-color: #FFFF00">Yellow text.</span>

How may I achieve this using this library.

I have found a workaround. I have registered "span" tag inside "registerBuiltInHandlers" method of "HtmlSpanner" class.
Style spanStyle = new Style().setDisplayStyle(Style.DisplayStyle.INLINE); TagNodeHandler spanHandler = new BorderAttributeHandler(wrap(new StyledTextHandler(spanStyle))); registerHandler("span", spanHandler);

This will allow span tag in html preview as inline block.