# What if your context menu was also made for developers?

Polypane is made for developers, so it's only natural that we also took a good look at an often overlooked piece of UI: the context menu.

In regular browsers the context menu is made for people that use websites, not for the people that build them. Right-click an image and you can search for it or share it, but to get its alt text or a data URI you have to open the devtools.

In Polypane the context menu looks at what you right-clicked on and shows the actions you need during development, like getting content off of the page, linking to specific parts of the page or even debugging elements directly. Here's what that helps you with.

## Pointing someone to the right place

Whether you're writing a bug report, reviewing a page with a colleague or adding a link to your documentation, you need to tell someone else where to look. "Scroll down to about halfway, it's under the second image" works, but a link that takes them there is better.

### Linking to an element

You can link to any element with an `id`, but finding out if an element has one (and what it is) means inspecting it. In Polypane, right-click an element and if it has an `id` you get **Copy link to document fragment**, which copies the page URL with the `#id` added to it.

![The Polypane context menu for a heading with an id, with the options 'Copy link to document fragment' and 'Copy link to document fragment as Markdown'](/static/fragment-c4dee97a4dc44178bc0f3c7603598e78.png)

There's also **Copy link to document fragment as Markdown**, which uses the text of the element as the link text. I use this a ton when writing docs and release notes.

### Linking to text

If there's no `id` nearby, select the text you want to point to, right-click it and choose **Copy link to highlight**. This creates a [text fragment link](/docs/browser-features/#copy-link-to-highlight): a link that scrolls to the text you selected and highlights it. These links also work in other browsers, so you can send them to anyone.

### Copying links in the format you need

When you right-click a link, the **Copy link as...** submenu lets you copy more than the URL:

*   **Copy link text** for just the text of the link.
*   **Copy link path** for just the path, without the domain. Use this to open the same page on another environment.
*   **Copy as Markdown** for `[link text](url)`, ready for your ticket, readme or chat message.
*   **Copy as HTML** for a complete `<a>` element.

![The Polypane context menu for a link, with the 'Copy link as' submenu open showing Copy link text, Copy link path, Copy as Markdown and Copy as HTML](/static/link-45a32ad17288fa44802ced63c77ff7e4.png)

#### Other types of links

For `mailto:` (and `tel:` and `sms:`) links, "copy link" gives you the scheme along with the value, and you then have to remove `mailto:` by hand.

Ever accidentally forgot to do that? Yeah, me neither.

Polypane shows **Copy email address** (or **Copy phone number** or **Copy SMS number**) for those links, and copies only the part you need.

![The Polypane context menu for an email link, with the option 'Copy email address'](/static/email-2ae44ab77f83223a3da45efa7f8224ce.png)

### Sharing the entire page

Lastly, you'll find **Copy page as Markdown** wherever you right-click. It copies the content of the page as Markdown, with the headings, links and images intact. That's useful when you want to move content into a document, and it's also a good way to give a page to an AI model without all the markup around it.

## Getting images and SVGs into your code

A lot of development is moving assets around: taking a logo from the live site and using it in a new component, inlining a small icon, or recreating something from production in a test case.

Right-click an image and open the **Copy image as...** submenu to get it in the format you need:

*   **Copy as data URI** for the base64 encoded image, ready to inline.
*   **Copy as IMG tag** for an `<img>` element with the `src` and `alt` already filled in.
*   **Copy as background-image** for a `background-image: url("...");` declaration.
*   **Copy as Markdown** for `![alt text](url)`.

![The Polypane context menu for an image, with the 'Copy image as' submenu open showing Copy alt text, Copy as data URI, Copy as IMG tag, Copy as background-image and Copy as Markdown](/static/image-5c0e344eb21f7ee003c62b84224e655d.png)

So no matter what you want to do with an image, Polypane saves you the time you'd otherwise spend converting it by hand.

## Inline SVGs

Inline SVGs are even more work in regular browsers. An inline `<svg>` isn't an image as far as the browser is concerned, so when you right-click one you get the same menu as when you right-click an empty part of the page.

If you want that icon, you have to open the devtools, find the `<svg>` element (and not the `<path>` you actually clicked on), copy the outer HTML, paste it into a new file and save that.

Polypane checks if the element you clicked is an SVG or is somewhere inside of one, and then gives you options for the entire SVG:

*   **Save SVG as...** saves it as a file. If the SVG has a `<title>`, we use that as the file name.
*   **Copy SVG** copies it as an image that you can paste into your design tool.
*   **Copy SVG as... → Copy as code** copies the markup so you can paste it into your component.
*   **Copy SVG as... → Copy as data URI** copies it encoded in a format you can use in your CSS.

![The Polypane context menu for an inline SVG, with options to save the SVG, copy it, or copy it as code or as a data URI](/static/svg-3a4fc313fd1ccca4879a3926f97dbc01.png)

## Checking your alt texts

You can't see an alt text by looking at a page (...unless your image fails to load), so checking one usually means opening the devtools to inspect the image and reading the attribute in the elements tree.

In Polypane the quickest way to check an alt text is to hold ⌥ and hover over the image. The tooltip that appears shows you the alt text along with other info on the image. You'll get a warning if the alt text is missing. There's [more on that below](#without-clicking-at-all).

![The Polypane Peek tooltip for an image, showing its rendered and actual size, alt text, current source, role and that it is not focusable](/static/peek-0d4a37ca3b97079ea1972258b5ff3cbc.png)

Seeing it is one thing, but often you also need to do something with it: paste it into an audit report, add it to a ticket or copy the text to find it in your code and rewrite it in your editor.

For that, the context menu is the easiest way to get it. Right-click the image and you'll find **Copy alt text** at the top of that same **Copy image as...** submenu. If that option is missing, the image doesn't have an alt text, which is also good to know.

> To check all the alt texts on a page in one go, use the images overview in the [Outline panel](/docs/outline-panel/).

[

### Polypane has everything you need to build great sites

Learn about Polypane](/)

## Checking the length of your text

Titles, meta descriptions, social media posts and button labels all have a length they should stay under. Many a text gets copied into a text editor, word processor or \*shudder\* an ad-riddled word counter website.

In Polypane, select the text and right-click. At the bottom of the context menu we show you how many characters, words, sentences and emoji are in your selection.

![The Polypane context menu for a text selection, showing 'Copy link to highlight' and the text '210 chars and 36 words'](/static/selection-15fbd609607ac88128778d31d332588d.png)

The count takes the language of the element into account, so it also works for languages that don't use spaces between words.

You can read more about that in the [measure text length docs](/docs/measure-text-length/), and I wrote about how it works in [Using the Intl segmenter API](/blog/using-the-intl-segmenter-api/).

## Debugging video and audio

Videos on the web frequently omit the controls and autoplay by default. That's fine for (most) visitors, but it gets in the way when you're developing. You're out of luck if you need to test if your captions work correctly or just want the video to stop playing when you're focusing on another part of the page.

When you right-click a video or audio element in Polypane, you can **Play** or **Pause** it and **Mute** or **Unmute** it directly, even if the page doesn't offer a way to do that.

That gives you direct controls, but the context menu also lets you **Show controls** or **Hide controls**. This adds the browser's native controls to the video, so you can scrub through it, check the duration and go full screen. When you're done, **Hide controls** removes them again.

![The Polypane context menu for a video without controls, with the options Pause, Show controls, Save video as, Copy video location, Copy video frame and Save video frame as](/static/video-bc9ed4e6311985d62eb595a3df96bfaa.png)

> Hold ⌥ while clicking any of these options to apply them to the same video in all panes.

### Creating a poster image

You can add an image as a `poster` attribute to show a placeholder before the video starts playing. If you want that to be the first frame (or any other frame) of the video, that means opening the video in an editor to export a frame, or taking a screenshot and cropping it and hoping you got the edges right.

In Polypane, pause the video on the frame you want, right-click and choose **Save video frame as...**. You get that frame at the full resolution of the video. **Copy video frame** does the same but puts it on your clipboard.

## Testing forms

Testing a form means filling it in, submitting it, finding an issue, fixing it and then filling it all in again. The context menu takes care of the filling in.

Right-click anywhere in a form and choose **Autofill form**. Polypane fills in all the fields with valid values that fit the field: an email address for an email field, a date for a date field and so on. **Clear form** empties the form again.

### Testing with values that might break your form

Valid values only test the happy path though. To find out what your form does with other input, right-click an input or textarea and open **Custom values**.

Over the years we've collected values that break forms. A few examples:

*   `John James "Jimmy" O'Grady`, a name with both types of quotes in it.
*   `Nguyễn Tấn Dũng` and `田中太郎`, names your database encoding should be able to deal with.
*   `Null`, which is an actual last name.
*   `"email..email"@example.com`, a valid email address that many validators reject.
*   `email@domain@example.com`, an invalid email address that some validators accept.
*   `Robert'); DROP TABLE Students;--`, also known as [little Bobby Tables](https://xkcd.com/327/).
*   `<script>alert('Executing JS')</script>`, to check that you escape your output.
*   `https://аррӏе.com`, which looks like a well known domain but is written in Cyrillic.
*   A value that is only tabs, spaces and newlines.

There are many more: test card numbers for different payment providers, phone numbers, post codes, numbers in different notations, right-to-left text and lorem ipsum in different scripts.

That's a long list, so Polypane sorts it for you. We look at the type of the input, its `autocomplete` attribute and its name, and move the categories that match to the top. For a credit card field you get payment cards first, and for an email field you get email addresses.

![The Polypane context menu for a credit card number field, with the Custom values submenu open and Payment cards as the first category](/static/customvalues-a0cb6efaf31e00b4c685b55b9a99ae60.png)

### Checking what you typed in a password field

When a login doesn't work while you're testing it, the first thing you want to know is if you typed the password correctly. Right-click the password field and select **Reveal Password** to see the text. Select it again to hide it.

![The Polypane context menu for a password field, with the options Autofill form, Clear form, Reveal Password and Custom values](/static/password-c7f5be2967f28b67e828e469a17055a1.png)

Read more about all of these in the [form autofill docs](/docs/form-autofill/).

## Without clicking at all

The context menu isn't the only place where Polypane looks at what's under your cursor. Hold ⌥ and hover over an element to show Polypane Peek, a tooltip with the dimensions, colors, font and spacing of that element.

Just like the context menu, it adds the info that's relevant for the type of element: the `alt` text and source of an image, the `name` and `type` of an input, where a link points to, and for any element its role, accessible name and whether it can be focused. Read more in the [Polypane Peek docs](/docs/polypane-peek/).

## Everything else is still there

We added all of this on top of what you expect from a context menu. Spelling suggestions, cut, copy and paste, opening links in new tabs and the menu items of your [browser extensions](/docs/browser-extensions/) are all there too.

Some of those do a little more than you're used to. **Reload this pane** reloads just the pane you right-clicked in, but if you hold ⌘ while clicking it you get a hard reload that skips the cache.

## A context menu for developers

So, what if your context menu was also made for developers? You right-click an SVG and get the SVG. You right-click a form and it gets filled in, and you right-click a heading to get a link to it.

None of these options are big features on their own. Each of them saves you a little bit of time and a trip to the devtools or to another website. But you do these things many times a day, and a browser that's made for developers should make them as easy as possible.

If you take a regular browser and add all of that, Polypane is what you end up with.

Is there something you do all the time that should be in the context menu but isn't? [Let us know](/support/) so we can add it!

Not using Polypane yet? [Start a free trial](/download/) and right-click on something.

---

Polypane is the browser for web developers. Try it at https://polypane.app.
