# TinyMCE adding data-attributes to links

**URL:** <https://community.modx.com/t/tinymce-adding-data-attributes-to-links/7688>\
**Category:** Random\
**Tags:** tinymcerte\
**Created:** [April 11, 2024, 8:39pm UTC](https://community.modx.com/t/tinymce-adding-data-attributes-to-links/7688 "2024-04-11T20:39:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sean69](https://community.modx.com/user_avatar/community.modx.com/sean69/32/389_2.png) [@sean69](https://community.modx.com/u/sean69)\
**Post date:** [April 11, 2024, 8:39pm UTC](https://community.modx.com/t/tinymce-adding-data-attributes-to-links/7688/1 "2024-04-11T20:39:00Z")

</div>

I have to add data attributes to inline links (in the content) as well as custom classes - more accurately, I need to allow the client to do it without editing markup.

Problem one, adding the custom classes, I’ve tried adding the classes as documented, json, a json array - the docs say the classes are supposed to appear in a drop down - they don’t. I noticed the plugin was called ‘modxlink’ so I added the link plugin and link on a separate toolbar. still does not appear. I though maybe it was the skin - can’t change the skin from the installed modx one looking in the source I see default, dark, document and writer installed - the only one that works is modx.

Problem two, I can’t find any information on adding custom attributes to a link. Even if it is possible.

Does anyone know how to get these tasks done?
