SVG code

New Here ,
Apr 14, 2021 Apr 14, 2021

Copy link to clipboard

Copied

Hello to everyone in this beautiful comuntity. 

I am wondering if anybody knows if it is possible to create a data_target="..." or id="..." withing the hyperlink attribute. For example if i would like to hiperlink the text APPLE in the illustrator and save it as SVG so I can get a code like: <a xlink:href="*" data-target="apple"> APPLE </a> or change the xlink:href to ID/Data target, so it will read something like: <a data-target="apple"> APPLE </a> 

 

I have multiple text to create a link on and if i will put those attributes (ID/Data target) manually I will spend too much time. 

 

Thank you all so much, and hope you have a wonderful day! 🙂

 

 

TOPICS
How to, Tools

Views

75

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 14, 2021 Apr 14, 2021

Copy link to clipboard

Copied

ID's need to be unique. Without additional JavaScript code that changes the DOM URI on the fly you can't expect this to work. I'm also not clear what you need the data-target for, as it's merely a placeholder for a data field and not a unique means of identification. Either way, without understanding the larger context of the web site thius is going to be used on this is not going anywhere inb the first place. This sounds like you are looking for a simple hack where more convoluted procedures are required.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

LATEST

Well, I am not the one who is creating the website, all what was required from me is an SVG with a proper layering system. All what I asked for is if anybody knows how to create SVG with <a id(or data-target, doesnt matter to me)="..."> attribute. I cannot discuss the project, but will tell that in some cases looking at SVG code, I create from that project, some <a> attributes had an id, and some of them not. However the layers and content/shapes were all alike. I've tried to reacreate it and it does nothing. So I believe I am missing something but can't figure out what exactly. 

Simple hack will help me and developers cut on time, so yes, I'm just trying to help the team. If Illustrator creates <a id=".."> and if anybody knows how then it will be great. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines