Hi everyone,
we’d like to share a small but handy module we developed at frameless Media: TextformatterSmartQuotes.
🧠 The Problem
While working on a client project, we needed to replace straight quotes ("...") with typographic quotes (like „...“) — but only in the visible text content, not inside HTML tags or attributes.
Using the TextformatterFindReplace module, a case like this:
<strong style="font-size: 18px;">Improved "well-being"</strong>
would turn into:
<strong style=„font-size: 18px;“>Improved „well-being“</strong>
which breaks the HTML.
We tried solving it with regular expressions, but none proved reliable enough. Every approach either failed to match all valid cases or accidentally modified tag attributes. That’s when we decided to build a dedicated solution.
✅ Our Solution
TextformatterSmartQuotes is a Textformatter that replaces quotes only in visible text, leaving HTML markup untouched.
It supports the following quote styles:
German: „…“
English: “…”
French: « … »
The quote style can be selected in the module’s settings.
📦 Installation
Place the module in /site/modules/TextformatterSmartQuotes/.
Install it via the Modules admin interface.
Assign it to any text/textarea/CKEditor field under “Text formatters”.
Configure your preferred quote style if needed.
This module helped us avoid fragile regex workarounds and keeps content formatting clean and reliable. Feel free to use, improve, or contribute to it.
You can download it on GitHub or via the Modules Directory
We’re happy to hear your feedback!
Cheers, Mike