Drupal 11: Strip Tags From Field In Migration

To strip the HTML tags from a field in the migration you just need to use the "callback" plugin, which is part of the core Migrate module.

  field_article_text:
    plugin: callback
    callable: strip_tags
    source: field_html_content/0/value

The field_article_text field will now contain the content from the text field field_html_content, minus any HTML tags.

Add new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
3 + 13 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.