# API for opening external links using Web Viewer

**URL:** <https://forum.obsidian.md/t/api-for-opening-external-links-using-web-viewer/96216>\
**Category:** Devs: Plugins & API\
**Tags:** api, webviewer\
**Created:** [February 6, 2025, 9:27am UTC](https://forum.obsidian.md/t/api-for-opening-external-links-using-web-viewer/96216 "2025-02-06T09:27:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![muuxi](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/e0b2c6/32.png) [@muuxi](https://forum.obsidian.md/u/muuxi)\
**Post date:** [February 6, 2025, 9:27am UTC](https://forum.obsidian.md/t/api-for-opening-external-links-using-web-viewer/96216/1 "2025-02-06T09:27:40Z")

</div>

Can you provide an API in the Web Viewer for opening external links, similar to `openLinkText`, for plugin usage?

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [February 6, 2025, 2:19pm UTC](https://forum.obsidian.md/t/api-for-opening-external-links-using-web-viewer/96216/2 "2025-02-06T14:19:17Z")

</div>

> [@How to Open the Latest Web Viewer (v1.8.3) Programmatically?](https://forum.obsidian.md/t/how-to-open-the-latest-web-viewer-v1-8-3-programmatically/95840):
>
> Hi everyone! I’m working on a custom Obsidian plugin and would like to programmatically open the latest version of the Web Viewer core plugin (v1.8.3). My goal is to create a new Web Viewer tab and load a specified URL through code. Is there any API like this? this.app.workspace.openUrl("https://example.com"); Thanks

---

<div class="post-metadata">

**Author:** ![muuxi](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/e0b2c6/32.png) [@muuxi](https://forum.obsidian.md/u/muuxi)\
**Post date:** [February 8, 2025, 1:48pm UTC](https://forum.obsidian.md/t/api-for-opening-external-links-using-web-viewer/96216/3 "2025-02-08T13:48:59Z")

</div>

This method will pop up a new window, is there any way to open it in a new tab?

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [March 8, 2025, 1:49pm UTC](https://forum.obsidian.md/t/api-for-opening-external-links-using-web-viewer/96216/4 "2025-03-08T13:49:35Z")

</div>

Closed on March 8, 2025, 1:49pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
