I have my lightning component in which I have added few Custom URLs. I have added that component on home page in lightning experience. Now when I click on any of the URL, it is opening as new window. But my requirement is to open that URL as a pop up.
[SalesForce] Want to open custom URL as a pop up in Lightning
Related Topic
- [SalesForce] Open LWC page from Salesforce aura component controller
- [SalesForce] How to open Lightning carousel image href link in new tab
- [SalesForce] Lightning Community Button to External URL
- Custom Lightning Component – How to open a url in the same window and also be able to open the url by right clicking and opening in a new tab
Best Answer
As far as i can think of, use a separate lightning component like UrlOPener and instantiate this component dynamically. Within this component embed an iframe and pass your url as an attribute to this component and use that attribute as source to the iframe. But using an iframe within lightning component is not recommended but still this works. use onclick handler in your url instead of anchor tag.
example:
}) }