Server-side syntax highlighting in 25 languages with themes, tabs, copy, download, line numbers, highlighted lines and collapsing.
A small plugin in three tabs, highlighted lines, copy and download buttons, a window-style header.
1<?php2/**3 * Plugin Name: Reading Time4 */5add_filter( 'the_content', function ( $content ) {6 $words = str_word_count( wp_strip_all_tags( $content ) );7 $minutes = max( 1, (int) ceil( $words / 220 ) );8 $badge = sprintf( '<p class="reading-time">%d min read</p>', $minutes );9 return $badge . $content; // prepend10} );1.reading-time {2 display: inline-flex;3 gap: 6px;4 padding: 4px 12px;5 border-radius: 99px;6 background: #eef2ff;7 color: #4338ca !important;8 font-size: 0.85rem;9}1// Update the badge when the reader scrolls2const badge = document.querySelector( '.reading-time' );3let ticking = false;4 5window.addEventListener( 'scroll', () => {6 if ( ticking ) return;7 ticking = true;8 requestAnimationFrame( () => {9 const done = Math.round( ( scrollY / document.body.scrollHeight ) * 100 );10 badge.dataset.progress = `${ done }%`;11 ticking = false;12 } );13} );The same Python snippet in every built-in theme.
1from dataclasses import dataclass2 3@dataclass4class Order:5 total: float6 paid: bool = False7 8def unpaid(orders: list[Order]) -> float:9 """Sum everything still owed."""10 return sum(o.total for o in orders if not o.paid) # 42.51from dataclasses import dataclass2 3@dataclass4class Order:5 total: float6 paid: bool = False7 8def unpaid(orders: list[Order]) -> float:9 """Sum everything still owed."""10 return sum(o.total for o in orders if not o.paid) # 42.51from dataclasses import dataclass2 3@dataclass4class Order:5 total: float6 paid: bool = False7 8def unpaid(orders: list[Order]) -> float:9 """Sum everything still owed."""10 return sum(o.total for o in orders if not o.paid) # 42.51from dataclasses import dataclass2 3@dataclass4class Order:5 total: float6 paid: bool = False7 8def unpaid(orders: list[Order]) -> float:9 """Sum everything still owed."""10 return sum(o.total for o in orders if not o.paid) # 42.51from dataclasses import dataclass2 3@dataclass4class Order:5 total: float6 paid: bool = False7 8def unpaid(orders: list[Order]) -> float:9 """Sum everything still owed."""10 return sum(o.total for o in orders if not o.paid) # 42.51from dataclasses import dataclass2 3@dataclass4class Order:5 total: float6 paid: bool = False7 8def unpaid(orders: list[Order]) -> float:9 """Sum everything still owed."""10 return sum(o.total for o in orders if not o.paid) # 42.51from dataclasses import dataclass2 3@dataclass4class Order:5 total: float6 paid: bool = False7 8def unpaid(orders: list[Order]) -> float:9 """Sum everything still owed."""10 return sum(o.total for o in orders if not o.paid) # 42.51from dataclasses import dataclass2 3@dataclass4class Order:5 total: float6 paid: bool = False7 8def unpaid(orders: list[Order]) -> float:9 """Sum everything still owed."""10 return sum(o.total for o in orders if not o.paid) # 42.5HTML with embedded CSS and JavaScript, SQL, Bash, YAML, Go and Rust.
1<!doctype html>2<nav class="menu" aria-label="Main">3 <a href="/shop" class="menu__link">Shop & save</a>4</nav>5 6 .menu__link { color: #0f766e; }7 8 9 document.querySelector('.menu').dataset.ready = 'yes';1SELECT c.name, COUNT(o.id) AS orders, SUM(o.total) AS revenue2FROM customers c3LEFT JOIN orders o ON o.customer_id = c.id4WHERE o.created_at >= '2026-01-01'5GROUP BY c.name6ORDER BY revenue DESC7LIMIT 10; -- top customers1#!/usr/bin/env bash2set -euo pipefail3# Build and ship4npm ci --silent5npm run build6rsync -az --delete dist/ "$DEPLOY_HOST:/var/www/app"7echo "Deployed at $(date +%H:%M)"1name: deploy2on:3 push:4 branches: [ main ]5jobs:6 build:7 runs-on: ubuntu-latest8 steps:9 - uses: actions/checkout@v410 - run: npm ci && npm test # must pass1package main2 3import "fmt"4 5func main() {6 total := 07 for i := 1; i <= 10; i++ {8 total += i9 }10 fmt.Println("sum:", total) // 5511}1fn main() {2 let words = vec!["hello", "world"];3 let shout: Vec = words.iter().map(|w| w.to_uppercase()).collect();4 println!("{}", shout.join(" ")); // HELLO WORLD5}Added and removed lines coloured from a patch; a snippet starting at line 41 with a highlighted range.
1@@ -12,7 +12,8 @@ function price( $cart ) {2 $subtotal = $cart->get_subtotal();3- $shipping = 4.99;4+ $shipping = $subtotal >= 50 ? 0 : 4.99;5+ // Free shipping over $506 return $subtotal + $shipping;7 }41 public function total(): float {42 $sum = 0.0;43 foreach ( $this->items as $item ) {44 $sum += $item->price * $item->qty;45 }46 return round( $sum, 2 );47 }Collapsed after 12 lines with “Show all”, and a fixed maximum height.
1export const color1 = '#01e241'; // swatch 12export const color2 = '#03c482'; // swatch 23export const color3 = '#05a6c3'; // swatch 34export const color4 = '#078904'; // swatch 45export const color5 = '#096b45'; // swatch 56export const color6 = '#0b4d86'; // swatch 67export const color7 = '#0d2fc7'; // swatch 78export const color8 = '#0f1208'; // swatch 89export const color9 = '#10f449'; // swatch 910export const color10 = '#12d68a'; // swatch 1011export const color11 = '#14b8cb'; // swatch 1112export const color12 = '#169b0c'; // swatch 1213export const color13 = '#187d4d'; // swatch 1314export const color14 = '#1a5f8e'; // swatch 1415export const color15 = '#1c41cf'; // swatch 1516export const color16 = '#1e2410'; // swatch 1617export const color17 = '#200651'; // swatch 1718export const color18 = '#21e892'; // swatch 1819export const color19 = '#23cad3'; // swatch 1920export const color20 = '#25ad14'; // swatch 2021export const color21 = '#278f55'; // swatch 2122export const color22 = '#297196'; // swatch 2223export const color23 = '#2b53d7'; // swatch 2324export const color24 = '#2d3618'; // swatch 2425export const color25 = '#2f1859'; // swatch 2526export const color26 = '#30fa9a'; // swatch 2627export const color27 = '#32dcdb'; // swatch 2728export const color28 = '#34bf1c'; // swatch 2829export const color29 = '#36a15d'; // swatch 2930export const color30 = '#38839e'; // swatch 3031export const color31 = '#3a65df'; // swatch 3132export const color32 = '#3c4820'; // swatch 3233export const color33 = '#3e2a61'; // swatch 3334export const color34 = '#400ca2'; // swatch 3435export const color35 = '#41eee3'; // swatch 3536export const color36 = '#43d124'; // swatch 3637export const color37 = '#45b365'; // swatch 3738export const color38 = '#4795a6'; // swatch 3839export const color39 = '#4977e7'; // swatch 3940export const color40 = '#4b5a28'; // swatch 401export const color1 = '#01e241'; // swatch 12export const color2 = '#03c482'; // swatch 23export const color3 = '#05a6c3'; // swatch 34export const color4 = '#078904'; // swatch 45export const color5 = '#096b45'; // swatch 56export const color6 = '#0b4d86'; // swatch 67export const color7 = '#0d2fc7'; // swatch 78export const color8 = '#0f1208'; // swatch 89export const color9 = '#10f449'; // swatch 910export const color10 = '#12d68a'; // swatch 1011export const color11 = '#14b8cb'; // swatch 1112export const color12 = '#169b0c'; // swatch 1213export const color13 = '#187d4d'; // swatch 1314export const color14 = '#1a5f8e'; // swatch 1415export const color15 = '#1c41cf'; // swatch 1516export const color16 = '#1e2410'; // swatch 1617export const color17 = '#200651'; // swatch 1718export const color18 = '#21e892'; // swatch 1819export const color19 = '#23cad3'; // swatch 1920export const color20 = '#25ad14'; // swatch 2021export const color21 = '#278f55'; // swatch 2122export const color22 = '#297196'; // swatch 2223export const color23 = '#2b53d7'; // swatch 2324export const color24 = '#2d3618'; // swatch 2425export const color25 = '#2f1859'; // swatch 2526export const color26 = '#30fa9a'; // swatch 2627export const color27 = '#32dcdb'; // swatch 2728export const color28 = '#34bf1c'; // swatch 2829export const color29 = '#36a15d'; // swatch 2930export const color30 = '#38839e'; // swatch 3031export const color31 = '#3a65df'; // swatch 3132export const color32 = '#3c4820'; // swatch 3233export const color33 = '#3e2a61'; // swatch 3334export const color34 = '#400ca2'; // swatch 3435export const color35 = '#41eee3'; // swatch 3536export const color36 = '#43d124'; // swatch 3637export const color37 = '#45b365'; // swatch 3738export const color38 = '#4795a6'; // swatch 3839export const color39 = '#4977e7'; // swatch 3940export const color40 = '#4b5a28'; // swatch 40Floating icon-only copy button on Markdown; long lines wrapped with numbers off.
1# Release notes2- **Faster** checkout, *fewer* steps3- New `coupon` field4> Thanks to everyone who tested!5[Read more](https://example.com)1const message = 'This line is deliberately very long so that you can see how the wrap option keeps everything visible without a horizontal scrollbar on narrow screens.';Every token colour set by hand for a brand-matched block.
1{2 "version": 3,3 "settings": {4 "color": { "palette": [ { "slug": "brand", "color": "#0f766e" } ] },5 "typography": { "fluid": true }6 },7 "styles": { "spacing": { "blockGap": "1.5rem" } }8}Moduly Elementor demos is proudly powered by WordPress