PHPackages                             teppokoivula/textformatter-code-blocks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. teppokoivula/textformatter-code-blocks

ActivePw-module[Parsing &amp; Serialization](/categories/parsing)

teppokoivula/textformatter-code-blocks
======================================

ProcessWire CMS/CMF Textformatter module for creating Markdown style code blocks.

1.0.2(5y ago)4351GPL-2.0-only

Since Jul 7Pushed 3y ago2 watchersCompare

[ Source](https://github.com/teppokoivula/TextformatterCodeBlocks)[ Packagist](https://packagist.org/packages/teppokoivula/textformatter-code-blocks)[ Docs](https://github.com/teppokoivula/TextformatterCodeBlocks)[ RSS](/packages/teppokoivula-textformatter-code-blocks/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (1)

TextformatterCodeBlocks
=======================

[](#textformattercodeblocks)

ProcessWire Textformatter module for enabling Markdown style code blocks for text or RTE fields.

Note: this is not a complete Markdown implementation, but rather a home-baked implementation of just one small part of the Markdown syntax. For full Markdown support, check out the TextformatterMarkdownExtra module, bundled with ProcessWire releases by default.

Getting started
---------------

[](#getting-started)

- Copy (or clone) the TextformatterCodeBlocks directory to /site/modules/
- Go to Admin &gt; Modules, hit "Refresh", and install TextformatterCodeBlocks
- Enable "Code Blocks Textformatter" for fields in which you wish to use code blocks

IMPORTANT: if you use Code Blocks Textformatter with a regular text or textarea field, make sure that you enable HTML Entity Encoder or use another method of escaping entities!

Code blocks
-----------

[](#code-blocks)

Code blocks should work fine when wrapped in `` or `` tags, so you can use them with RTE, such as CKEditor. This module supports two types of code blocks: fenced and inline.

*Note: following code examples have been escaped for better readability when rendered in GitHub. In a nutshell the syntax for fenced code blocks is three backticks around a code block, and for inline code blocks just sourround a specific piece of code with single backticks.*

### Fenced code blocks

[](#fenced-code-blocks)

Simple example:

```
```
` make more sense.`

The end result of inline code blocks looks like this:

`While fenced code blocks are great for longer code snippets, sometimes &lt;?php echo "inline code blocks"; ?&gt; make more sense.`

Enabling syntax highlighter
---------------------------

[](#enabling-syntax-highlighter)

Though syntax highlighting is not necessary for this module to work, it can be really helpful for your end users. You can use any syntax highlighter, but I would recommend Prism.js.

For detailed instructions on enabling Prism.js on your site, please visit .

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~209 days

Total

3

Last Release

2086d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1252021?v=4)[Teppo Koivula](/maintainers/teppokoivula)[@teppokoivula](https://github.com/teppokoivula)

---

Top Contributors

[![teppokoivula](https://avatars.githubusercontent.com/u/1252021?v=4)](https://github.com/teppokoivula "teppokoivula (13 commits)")

---

Tags

processwiremarkdownmoduletextformatter

### Embed Badge

![Health badge](/badges/teppokoivula-textformatter-code-blocks/health.svg)

```
[![Health](https://phpackages.com/badges/teppokoivula-textformatter-code-blocks/health.svg)](https://phpackages.com/packages/teppokoivula-textformatter-code-blocks)
```

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M702](/packages/league-commonmark)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k28.6M199](/packages/league-html-to-markdown)[silverstripers/markdown

Markdown DB field and form field for SilverStripe

112.5k](/packages/silverstripers-markdown)[teppokoivula/search-engine

SearchEngine is a ProcessWire CMS/CMF module for indexing and searching site contents.

181.3k2](/packages/teppokoivula-search-engine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
