Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dragomano/prismjs-for-smf

Syntax highlighting for code blocks on SMF forums
https://github.com/dragomano/prismjs-for-smf

smf-mods syntax-highlighting

Last synced: 3 days ago
JSON representation

Syntax highlighting for code blocks on SMF forums

Awesome Lists containing this project

README

        

# PrismJS for SMF

[![SMF 2.1](https://img.shields.io/badge/SMF-2.1-ed6033.svg?style=flat)](https://github.com/SimpleMachines/SMF2.1)
![License: MIT](https://img.shields.io/github/license/dragomano/prismjs-for-smf)
![Hooks only: Yes](https://img.shields.io/badge/Hooks%20only-YES-blue)

- **Tested on:** PHP 8.2.16
- **Languages:** English, French, Russian, Spanish

## Description

- This script highlights syntax in the code blocks on SMF forums.
- It is necessary to specify the language used: `[code=html]

Hello world

[/code]`.
- You can specify the default language and then short syntax is available: `[code]echo 'How are you?';[/code]`
- The theme style can be changed (8 styles).
- [260 supported languages](https://prismjs.com/#supported-languages).

This mod uses [PrismJS](https://prismjs.com) script of Lea Verou and contributors.

It is released under the MIT License.

![prismjs_settings](https://user-images.githubusercontent.com/229402/131349250-48af6c46-a2f2-4da9-bd3f-47034de35639.png)

---

## Описание

- Эта модификация добавляет подсветку синтаксиса в блоках кода на форумах SMF.
- Необходимо указывать используемый язык: `[code=html]

Hello world

[/code]`.
- Можно указать язык по умолчанию и тогда доступна короткая запись: `[code]echo 'How are you?';[/code]`
- Доступна смена стиля оформления (8 стилей).
- [Поддерживается 260 языков](https://prismjs.com/#supported-languages).

Используется скрипт [PrismJS](https://prismjs.com) Lea Verou и соавторов.

Распространяется на условиях лицензии MIT.