How we can use typing effect anywhere of web page in drupal 8 or 9

Created on 17 February 2022, over 2 years ago
Updated 22 July 2023, over 1 year ago

TypedJS Filter is the great module in order to use Typing effect but if we use node as block module of Drupal we can use that any where ! also we can use that in block , One of the great advantages of this module is the use of color for each word in the text

https://www.drupal.org/project/typedjs_filter

Feature request
Status

Closed: works as designed

Version

1.0

Component

Miscellaneous

Created by

🇮🇷Iran alirahimian

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷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,
         ];
    }
    
Production build 0.71.5 2024