The idea is to be able to use the modal style in links
For example,
If I have a blog and mark a link to a video in my text, the application understands that there is a link mark and opens the modal with the defined style
Possibility of incorporating CSS and JS into links anywhere on the website, making it easier to use the video modal.
If I mark a link, be it simple text or a button, for example with ID = “youtube-gallery”
the application understands that I want to open the modal in the style defined in my app.
You see, even if you copy the link to the video from the widget (using the Share button), it still will be a link to the video on YouTube, but not to the YouTube video in the widget.
Got it! You’re using YouTube embed links to specific videos, and you want to open them in a popup on the same tab.
The thing is that we can definitely assist with any widget-related issues or requests, but when it comes to such non-related cases, it’s a bit tricky to provide direct recommendations.
However, I’ve asked ChatGPT for a potential solution, so feel free to give it a try
It’s possible to make the YouTube embed link open in a popup on the same tab instead of opening a new tab. To achieve this, you can use JavaScript to prevent the default behavior of opening a new tab and instead open the video in a popup.
I completely get your idea, but, unfortunately, there is no way to implement this feature using our YouTube Gallery app (even with the Custom JS/CSS sections).
However, we’ve double-checked things with the devs, and they’ve suggested using our Popup widget for this purpose.
The thing is that you should create a separate Popup widget for each link. So, if you have 15 links, you’ll need 15 Popup widgets.
Here is what should be done:
Assign IDs to your YouTube links
You should manually assign any IDs to YouTube links. Here is an example of how it should look:
The project may have several links to YouTube, so it is impossible to do this manually.
The idea is to create a module for Magento 2 to control links that are marked as “youtube-modal”, so the module takes care of doing this automatically…
Got your point, but, unfortunately, it’s the only solution for now.
Your use case seems to be quite custom, but anyway, I’ve moved this idea to the Wishlist. If more users support this request, it might be considered in the future