ti-html2as
ti-html2as copied to clipboard
Link colour support
Hi @FokkeZB,
Not sure how i can submit this as a update but here is support for link color on attributed strings.
in your common js module line 109.
parameters.attributes.unshift({
type: ns.ATTRIBUTE_LINK,
value: node.attribs.href,
range: [offset, length]
}, {
type : ns.ATTRIBUTE_FOREGROUND_COLOR,
value : node.attribs.color,
range: [offset, length]
}, {
type : ns.ATTRIBUTE_UNDERLINE_COLOR,
value : node.attribs.color,
range: [offset, length]
});
Then you can do this.
<a color=#FFFFFF href="policy">Privacy Policy</a>
Thanks for this great module
Very nice!
You can create a fork of this project and then edit https://github.com/FokkeZB/ti-html2as/blob/master/index.js and add a test to https://github.com/FokkeZB/ti-html2as/blob/master/test/specs/indexSpec.js
Hi @FokkeZB
Here you go https://github.com/samueleastdev/ti-html2as