Contrib Half Hour 2023-07-06: Writing custom text filters

Created on 6 July 2023, 12 months ago
Updated 22 September 2023, 9 months ago

This week we looked at writing custom text filters for Drupal 9+, starting by porting the Spoiler module's text filter to D9.

D8+ change notice detailing text filters now being an annotated plugin instead of a hook:
https://www.drupal.org/node/2015901 β†’

create_function() was removed in PHP 8:
https://www.php.net/create_function

theme() should not be called directly:
https://www.drupal.org/node/2195739 β†’

render() replaced with a renderer service:
https://www.drupal.org/node/2939099 β†’

FilterBase plugin:
https://api.drupal.org/api/drupal/core%21modules%21filter%21src%21Plugin...

once JS library docs:
https://www.npmjs.com/package/@drupal/once

hook_theme():
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...

Adding and using libraries:
https://www.drupal.org/docs/develop/creating-modules/adding-assets-css-j... β†’

Video recording

https://youtu.be/1EeX-zq55yc

πŸ“Œ Task
Status

Fixed

Component

Meeting notes

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024