# Secret TextExpander Codes and How to Use Them

**URL:** <https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257>\
**Category:** TextExpander Talk\
**Created:** [June 5, 2025, 2:52pm UTC](https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257 "2025-06-05T14:52:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh.centers](https://sea3.discourse-cdn.com/textexpander/user_avatar/community.textexpander.com/josh.centers/32/8_2.png) [@josh.centers](https://community.textexpander.com/u/josh.centers)\
**Post date:** [June 5, 2025, 2:52pm UTC](https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257/1 "2025-06-05T14:52:39Z")

</div>

Did you know that TextExpander has secret codes? Well, before TextExpander 7.0, they [weren’t so secret](https://textexpander.com/learn/using/snippets/advanced-snippet-elements/special-codes). You could manually insert shortcodes for features like Fill-in Fields, optional sections, and cursor movement into any Snippet.

We’ve since hidden those codes behind a graphical interface… for most Snippets. However, they still work in script Snippets, like AppleScript, JavaScript, and Shell Script.

**And here’s a trick:** You can insert any of these codes into one of those Snippet types, change the content type to Plain Text or Rich Text, and they will appear as their graphical elements.

![Clipboard-20250605-145208-398](https://us1.discourse-cdn.com/textexpander/original/1X/4cc2e8fd8221ba9e764472fcacdaa2a8031e5100.gif)

Why is this a good trick to know? In short, speed:

- If you know the codes, you can quickly type them out instead of clicking through menus.
- You can programmatically create long Popup Menus and Optional Sections. A couple of examples:

Recently, I posted about [using ChatGPT to create Optional Sections](https://community.textexpander.com/t/use-chatgpt-to-generate-textexpander-checklists/213) using these codes.

Without further ado, here are those special codes:

## Fill-in Fields

- `%filltext:name=<field name>%` = Single Line fill-in field
- `%fillarea:name=<area name>%` = Multi Line fill-in field
- `%fillpopup:[default=]<value>:<value>:<value>[…]%` = Popup Menu
- `%fillpart%<content of optional section>%fillpartend%` = Optional Section

## Cursor Movement

- `%>` = cursor right
- `%<` = cursor left
- `%^` = cursor up
- `%v` = (letter v) cursor down

## Other

- `%clipboard` = Insert clipboard text contents here.
- `%|` = Position the cursor at that location once a Snippet is expanded.
- `%\\` = Select a range of text upon Snippet expansion. The text must be surrounded by %| at the beginning and %\ at the end.
- `%%` = Expand a single percent character (“escape” the percent sign from being treated as a macro code).
- `%Snippet:<Snippet abbreviation>%` = Nest the specified Snippet’s expansion within this one.

For examples, see these posts:

> [@Date Picker Snippet: Pick Your Own Picker](https://community.textexpander.com/t/date-picker-snippet-pick-your-own-picker/216):
>
> I’ve seen several requests for various date pickers inside TextExpander. I’ve created a Snippet that gives you a library of pickers you can add to your own Snippets. Subscribe to the [Community Snippets Public Group](https://snippets.textexpander.com/group/fa796ecbe167aeb836aced0a65e43b94) and check out the Date Picker Snippet, abbreviation com.pickerdate. This Snippet isn’t really designed to be expanded. Instead, the ideas is to give you multiple pickers that you can copy and then paste into your own Snippet. You can click on a bubble, copy it, and then paste it int…

> [@50 States Popup Menu](https://community.textexpander.com/t/50-states-popup-menu/229):
>
> I received a request by email for a Snippet with a Popup Menu for all 50 states much like we did for [dates](https://community.textexpander.com/t/date-picker-snippet-pick-your-own-picker/216). Subscribe to our [Community Snippets Public Group](https://snippets.textexpander.com/group/fa796ecbe167aeb836aced0a65e43b94) and then look for: com.50states: All 50 states in one Popup Menu. com.50stateabr: All 50 state abbreviations in one Popup Menu. As always, you can copy these Popup Menus from these Snippets and paste them into your own. For more on how I created these, see this topic:

---

<div class="post-metadata">

**Author:** ![TDK](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@TDK](https://community.textexpander.com/u/TDK)\
**Post date:** [June 6, 2025, 6:35am UTC](https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257/2 "2025-06-06T06:35:26Z")

</div>

This shouldn’t need to be a “trick.” Your article gives no reason as to why they were hidden in the first place. It would be much better, if, say, the snippet syntax was recognised and changed colour – for each recognised syntax term – as you typed in Plain Text or Rich Text. Upon saving, it just gets parsed/replaced with the lozenges then appearing.

---

<div class="post-metadata">

**Author:** ![josh.centers](https://sea3.discourse-cdn.com/textexpander/user_avatar/community.textexpander.com/josh.centers/32/8_2.png) [@josh.centers](https://community.textexpander.com/u/josh.centers)\
**Post date:** [June 6, 2025, 2:46pm UTC](https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257/3 "2025-06-06T14:46:37Z")

</div>

> [@TDK](#):
>
> Your article gives no reason as to why they were hidden in the first place.

That decision was made before I arrived, and most of that team has moved on, so it’s as much of a mystery to me as it is to you. My **assumptions** as to why the change was made:

- Raw codes were confusing less-technical users.
- Almost no one used the feature.
- You can still use the codes with the more-advanced scripting content types.

Again, these are merely guesses.

---

<div class="post-metadata">

**Author:** ![TDK](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@TDK](https://community.textexpander.com/u/TDK)\
**Post date:** [June 6, 2025, 2:51pm UTC](https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257/4 "2025-06-06T14:51:36Z")

</div>

I mean, if only TextExpander had access to developers familiar with text replacement, hey?😉

I think your reasons are all sound assertions. Doesn’t mean they are right, though. The script dance does work, but is clunky at best.

---

<div class="post-metadata">

**Author:** ![JasonSennitt](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@JasonSennitt](https://community.textexpander.com/u/JasonSennitt)\
**Post date:** [June 8, 2025, 1:07am UTC](https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257/5 "2025-06-08T01:07:08Z")

</div>

I’d say these are probably reasonable guesses/assumptions @josh👍  
As a product owner you’d want as many different users to be able to use what is easiest for them and their use case. UX design principles 101 right?

---

<div class="post-metadata">

**Author:** ![DerrickLee](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@DerrickLee](https://community.textexpander.com/u/DerrickLee)\
**Post date:** [March 11, 2026, 9:34pm UTC](https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257/6 "2026-03-11T21:34:49Z")

</div>

Help! On the latest version, switching the content type from plain/rich text to javascript doesn’t display the underlying javascript, it still shows the GUI elements like [(popup)] and [(optional section)]. How can I extract the javascript so I can edit it further in an LLM? Thanks!

---

<div class="post-metadata">

**Author:** ![josh.centers](https://sea3.discourse-cdn.com/textexpander/user_avatar/community.textexpander.com/josh.centers/32/8_2.png) [@josh.centers](https://community.textexpander.com/u/josh.centers)\
**Post date:** [March 11, 2026, 10:53pm UTC](https://community.textexpander.com/t/secret-textexpander-codes-and-how-to-use-them/257/7 "2026-03-11T22:53:13Z")

</div>

Unfortunately that is a one-way street. I haven’t tested this, but you might try screenshotting the Snippet and feeding it to your LLM so it can recreate the code. Then save that JavaScript source for in the future.
