How to add Data Attribute via Added Class

I am wondering how I can add a data attribute to a CMS item as per the class applied to the CMS item?


Here is my site Read-Only: LINK
(how to share your site Read-Only link)