- 🇫🇷France Dom.
Actually you can:
Anywhere you want, just add the syntax needed:
Here is a [rotate]simple|easy|cute[/rotate] way to rotate text
Could be on a page, could be on a view, anywhere.
Then, you will need to add the library and configuration to that specific page using
hook_page_attachments()
:function mymodule_page_attachments(array &$attachments) { // Check if the page if the one you need from the $request [...] // Attach the library. $attachments['#attached']['library'][] = 'text_rotator_filter/text_rotator_filter'; // Add the configurations. $attachments['#attached']['drupalSettings']['text_rotator_filter'] => [ 'animation' => 'dissolve', 'speed' => 350, ]; }