Long ago, back in 2009, I took the code of Tipograf and made an input filter for Drupal 6 that puts in nice dashes and quotation marks, packaged it as a module and called it Typofilter. You can read about that old module here (in Russian). Later I decided that instead of automatic typography applied after saving, it's much better to fix typography while you write. So in 2011 I put together a JS script for that. The script is now available on GitHub.
In 2025 I decided it would be nice to have the same convenience in Obsidian too, and made an Obsidian plugin.
The script puts in proper (m- and n-width) dashes, guillemet quotes («») and other characters. It's aimed at Russian typography.
What the script does
— replaces (c) with ©;
— replaces (r) with ®;
— replaces (tm) with ™;
— replaces multiple dots with an ellipsis;
— replaces +- with ±;
— replaces -> with →;
— replaces <- with ←;
— fixes quotation marks (uses guillemet quotes «»);
— replaces hyphens with dashes in text;
— replaces hyphens with N-width dashes in number ranges;
— removes spaces between a number and the percent sign.
Supported editors
- The Obsidian editor, via the Obsidian Typofilter plugin
- Markdown Editor in OctoberCMS
- CKEditor (partially)
- TinyMCE (partially)
The source code and the usage guide are on GitHub: https://github.com/graker/typofilter.js
Questions about installing, using or improving the script can be asked here or right on GitHub.