Drupal

Implement a custom filter which replaces "[name:FIRSTNAME:LASTNAME]" to "Name: LASTNAME FIRSTNAME"

Filter API allows you to replace the short tokens in the content with the HTML block. Implement a filter that replaces the token in any text formats to "Name: LASTNAME FIRSTNAME" using the Filter API.

For example:
Token: [name:john:doe]
Result: Name: doe john

Deliverables A filter which replaces the "[name:FIRSTNAME:LASTNAME]" token to "Name: LASTNAME FIRSTNAME"

Hint: Use the regular expression to detect the pattern.

Resources Filter API overview

Creating a Custom Filter in Drupal 8

Task tags

  • development

Students who completed this task

alzz_26, ismhdez, Mokshit06, adam3278, neel24, Adev Saputra, agrochal, Hayo, supergrecko

Task type

  • code Code
close

2019