Text Patterns and the Quick Link Toolbar in WordPress 4.3

Quick Link Toolbar Featured Image
photo credit: metal chain(license)

WordPress 4.3 is on schedule to be released August 18th and contains a number of improvements. Among the enhancements to the visual editor are text patterns. Text patterns or text shortcuts allow you to quickly add unordered lists, ordered lists, headers, and blockquotes without having to use a mouse.

In the visual editor in WordPress 4.3, typing * or - and hitting the space bar will generate a bulleted list. Typing 1.  or  1) and hitting space will generate a numbered list. If you don’t want to create these lists or do so in error, clicking the undo button or hitting ctrl/cmd+z or esc will undo the text pattern.

Starting a paragraph with two to six number signs # will convert the paragraph to a heading. Similarly, the greater-than symbol > will convert the paragraph to a blockquote.

  • ## = H2
  • ### = H3
  • #### = H4
  • ##### = H5
  • ###### = H6

It took a few tries to figure out but once I got the hang of it, I discovered that I prefer using text patterns versus clicking the appropriate button in the editor.

For example, the blockquote text pattern places text into a blockquote and automatically closes it while also starting a new paragraph. Traditionally, I highlight text and click on the blockquote button in the editor. Often times, I have to visit the text editor and close the blockquote to start a new paragraph.

Ryan Boren, WordPress core lead developer, created the following video which shows the text patterns in action on a mobile device.

Quick Previews of Links

WordPress 4.2 included a subtle but convenient feature for adding links to text. Pasting the URL to highlighted text automatically turns it into a link. The problem is that there isn’t an easy way to preview the URL without opening it in a new browser tab.

When you click a link in the WordPress 4.3 visual editor, a small inline link toolbar displays the full URL with buttons to edit or remove it. This avoids having to use the Insert/edit link modal window.

Preview Links in The Visual Editor WordPress 4.3
Preview Links in The WordPress 4.3 Visual Editor

Changes to Word and Character Counts

Word and character counts have also changed in WordPress 4.3. Instead of updating counts when pressing enter or return, it will refresh when you stop typing. A lot more characters that shouldn’t be counted as words are excluded. Ella Iseulde Van Dorpe, WordPress core contributor, lists other notable changes.

  • For character count, we no longer exclude any of these characters. This means that numbers and common western punctuation are no longer excluded compared to 4.2. Emoji and other astral characters are now counted as one character instead of two.
  • We added a new type all, in addition to words and characters, that will count characters including spaces. This seemed necessary for Japanese and maybe other languages. This is now character_including_spaces and character_excluding_spaces.
  • Shortcodes and HTML comments are now excluded.

To view details and a summary of all the work that went into improving word counts, check out ticket #30966 on trac. As someone who uses the WordPress content editor for a living, I’m anxiously looking forward to utilizing these enhancements on an everyday basis.


15 responses to “Text Patterns and the Quick Link Toolbar in WordPress 4.3”

  1. There is an option to auto-correct XHTML code automatically (Settings -> Writing). I would have liked to have this markdown editing as a switchable option. Sometimes I like having asterisks instead of bulleted lists. It’s just my personal style.

    I do the same with Google Docs, whenever a list is generated I have to press the backspace key to undo it and have a regular line. It’s just a tiny thing that might get on one’s nerves if repeated too many times.

      • Sometimes the blog posts turn to lots of technical details, and I like to format them as I see fit. I get your point, it’s just that I don’t like my text to be auto-formatted. I understand this option for non-tech clients, but as a developer, I can format my own code, so a filter and a checkbox would be most beneficial.

        Maybe I can quickly code this as a plugin.

    • Well, WP team learns from its errors: they disabled a feature from WP 4.2 in this version. If these two features do not agree to the users, I suppose they will do the same. As I think Text Patterns is a good idea – such feature is not coming from nowhere (see GitHub and some forums) – I won’t agree with you.

    • So, tell us: how do we turn off the ridiculous text patterns feature in the editor? Many of us simply don’t want it. I use keyboard shortcuts in the editor–they already exist, and anyone who writes seriously in other editors, and in word processors, already uses the same common keyboard shortcuts as they have for almost 20 years now. I do not need some editor deciding what I wanted to type. I am holding off upgrading other sites to 4.3 until WP decides to resolve this. Anyone?


Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.