ti-html2as icon indicating copy to clipboard operation
ti-html2as copied to clipboard

Link colour support

Open samueleastdev opened this issue 9 years ago • 2 comments

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

samueleastdev avatar Nov 02 '16 18:11 samueleastdev

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

FokkeZB avatar Nov 03 '16 09:11 FokkeZB

Hi @FokkeZB

Here you go https://github.com/samueleastdev/ti-html2as

samueleastdev avatar Nov 03 '16 10:11 samueleastdev