Data-pg-ia attribute

Hello Pinegrow Community. I’m new to Pinegrow Software, i’m trying to do some tests with the trial license (Thank Pinegrow Team to make a longer license, after asking).

I have a question about the data-pg-ia attribute. I found the Interaction add-on easy to use. And I would know if it is possible to interacte with elements without the use of the attribute data-pg-ia? In a js file for example?
Because with data-pg-ia, the html code become difficult to read or to use it in a CMS (modx) for example.

Hi @Jerome,
The interactions plugin includes the GreenSock library. Part of the fee you pay is for the licensing of that library. If you look at the terms of that license you will see that you are only allowed to use this library in your projects if you use the Pinegrow interface, not if you control the GreenSock library directly through JavaScript. Sorry.

EDIT: Not much to be done about code readability, but just looking at MODx, I don’t see why you can’t load in the JavaScript to power Interactions there.
Cheers,
Bob

Hi RobM. Thanks for your answer.

With Modx, of course, I can do it. My question was more on readibility of code, if it is possible to have with the Pinegrow Interface the interaction inside a js file instead of the data attribute.
Because it seems possible to use API to call interactions, so with javascript, I thought it was possible to Pinegrow to make directly interactions inside a js file or inside a script tag.

Hi @Jerome,
Pinegrow can’t do this automatically, but I guess you could move the data-pg-ia into a custom script and inject it back onto the page with JavaScript.
Cheers,
Bob