Parser/processor for simple tags

Created on 7 March 2019, over 5 years ago
Updated 26 August 2024, about 1 month ago

Hi, it would be great to have parser and processor for simple tags like H1, H2, Blockquote etc.

Feature request
Status

RTBC

Version

1.0

Component

Code

Created by

🇧🇾Belarus skorzh Belarus

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.

  • 🇬🇧United Kingdom kolin

    Re-rolled the patch for the latest 2.x

  • Status changed to RTBC 8 months ago
  • 🇬🇧United Kingdom kolin
  • 🇬🇧United Kingdom kolin

    I've tested this with a simple blockquote paragraph. It works as expected:

    ```
    field_content:
    plugin: html_to_paragraphs
    source: body
    parser:
    -
    plugin: html_parser_plain
    tags:
    - blockquote
    process:
    -
    plugin: html_process_plain
    tag: blockquote
    bundle: quote
    field_name: field_copy_basic
    text_format: basic_rich_text
    -
    plugin: html_process_text
    bundle: rich_text
    field_name: field_rich_text
    text_format: rich_text
    fallback: true
    ```

  • 🇬🇧United Kingdom ipwa

    This works for me, just what I needed :D

  • 🇬🇧United Kingdom ipwa
    field_components:
        plugin: html_to_paragraphs
        source: content
        parser:
          -
            plugin: html_parser_plain
            tags:
              - blockquote
        process:
          -
            plugin: html_process_plain
            tag: blockquote
            bundle: quote
            field_name: field_blockquote
            text_format: full_html
          -
            plugin: html_process_text
            bundle: text
            field_name: field_text
            text_format: full_html
            fallback: true
    
  • 🇬🇧United Kingdom ipwa

    Reviewed and tested.

Production build 0.71.5 2024