nk2028 / opencc-js

The JavaScript version of Open Chinese Convert (OpenCC)
https://www.npmjs.com/package/opencc-js
MIT License
240 stars 22 forks source link

`.HTMLConverter`: convert also placeholder and aria-label attributes. #19

Open firmart opened 2 years ago

firmart commented 2 years ago

The .HTMLConverter API works perfectly for text nodes, but it would be even nicer if it could also convert attributes like placeholder, aria-label etc.

Thanks.

sgalal commented 2 years ago

Thanks! Could you make a pull request?

firmart commented 2 years ago

I just had a look at the source code, it does seem fairly easy to achieve. Will look if I got time before next year... Thanks for the quick reply.