When it comes to inserting links via Javascript, we usually use 2 different methods, but we are not specialists in this. We normally use the following methods:
- <span onclick="window.location.href='https://www.domain.com/'">Anchor</span>
- <span onclick="window.open('https://www.domain.com/','_self')">Anchor</span>
Thank you very much and best regards from Rodanet!