plugincomponent
Utilities

Easy Code Highlighter

Code Highlighter Plugin for Joomla

J4 J5 J6
5.03.4K+ downloads v2.0
Easy Code Highlighter
DemoPHP with line highlight

<?php
declare(strict_types=1);

function greet(string $name): string
{
    return "Hello, {$name}!";
}

echo greet("Joomla");
DemoCSS sample

.sample-card {
    border-radius: 8px;
    border: 2px solid #f59e0b;
    padding: 1rem;
    font-weight: 600;
}
DemoJavaScript fetch helper

async function loadPosts(url) {
    const response = await fetch(url);

    if (!response.ok) {
        throw new Error(`Request failed: ${response.status}`);
    }

    return response.json();
}

loadPosts("/api/posts.json").then(console.log);
DemoHTML markup

<section class="hero">
    <h1>Easy Code Highlighter</h1>
    <p>Prism.js syntax highlighting for Joomla.</p>
    <a class="button" href="#docs">Read the docs</a>
</section>
DemoSQL query

SELECT a.id, a.title, a.language
FROM #__easycodehighlighter AS a
WHERE a.state = 1
ORDER BY a.ordering ASC, a.title ASC;
DemoPython snippet

from pathlib import Path

def read_lines(path: str) -> list[str]:
    return Path(path).read_text(encoding="utf-8").splitlines()

print(read_lines("readme.txt")[:5])

Mobile Menu

Login

Don't have an account yet? Register now!