Skip to content

Context Menu

Tachi Code includes several features that integrate with the browser’s context menu, allowing you to quickly open content in Tachi Code.

Selecting a context menu item opens the relevant content in your most recently used Tachi Code tab. If no Tachi Code tab is open, it opens in a new browser tab. You can change this with the browserExtension.openContentIn setting (see Where content opens).

Context menu integration

Creates a new file in Tachi Code with the text currently selected in your browser.

Opens a diff view in Tachi Code comparing the contents of the clipboard with the current tab’s selected content in a diff view.

Opens the currently selected DOM element’s HTML source code in Tachi Code. This is useful for quickly viewing and editing the source of a specific element on a webpage.

If the selected DOM element is an SVG element or child of an SVG element, Tachi Code opens the SVG source code.

This action was called Open Selection in Tachi Code before v1.11.0.

Opens the HTML source code of the current webpage in Tachi Code. This allows you to view and edit the entire page’s source code.

Right-click any image on a web page to open it in Tachi Code’s image viewer. This works for regular image URLs, inline data: images, and blob: images created by the page.

The browserExtension.openContentIn setting, under Browser Extension > General, controls where content from the context menu opens:

  • Existing Tab (default) opens in the most recently focused Tachi Code tab, switching windows if needed.
  • Existing Tab in Current Window opens in the most recently focused Tachi Code tab in the current window, or a new tab if there isn’t one.
  • New Tab always opens a new Tachi Code browser tab.

The same setting applies to Open in Tachi Code, New File in the toolbar popup, and settings links. Editors embedded in web pages are never reused.

You can show or hide each context menu action with the browserExtension.serviceWorker.contextMenuActions setting.

Read the Settings page for more information on how to configure Tachi Code’s context menu features.