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 Features
Section titled “Context Menu Features”Paste Selected Text into New File
Section titled “Paste Selected Text into New File”Creates a new file in Tachi Code with the text currently selected in your browser.
Compare with Clipboard
Section titled “Compare with Clipboard”Opens a diff view in Tachi Code comparing the contents of the clipboard with the current tab’s selected content in a diff view.
View Element Source
Section titled “View Element Source”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.
View Page Source
Section titled “View Page Source”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.
Open Image in Tachi Code
Section titled “Open Image in Tachi 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.
Where content opens
Section titled “Where content opens”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.
Configuration
Section titled “Configuration”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.