Five Solutions for Pasting Plain Text on a Mac

Another solution that I have learned is to use the Python module ftfy (fixes text for you) by creating an Automator service.

You need to have Python 3 in your /usr/local/bin path (for instance, using brew install python3), and install ftfy first with /usr/local/bin/pip3 install ftfy.

Once you’ve done that, then the workflow can be created by:

  1. Creating a new Quick Action
  2. Indicate that the new action replaces the existing text
  3. Search for Run shell script action, and move it to the workflow
  4. Select /usr/local/bin/python3 as the Shell in the dropdown menu
  5. Replace the text inside by the following:
import sys
from ftfy import fix_text

for f in sys.stdin:
	print(fix_text(f))

Once you’ve done that, you can save your workflow (mine is named “Fix text with ftfy”), and then you can use it anywhere where you can select and edit text… like this comment field.

For instance, the two lines originally had the text: “l’humanité”, but the bottom one was processed by the workflow:

  • l’humanité
  • l’humanité