Skip to content

When using the parser to convert <template>, the document fragment content is empty. Is there a way to get access to that data? #849

Closed
@TimeDropsSB

Description

@TimeDropsSB

Question

Consider this code snippet:

HTMLReactParser(`<template><article><p>Test</p></article></template>`);

When using the parser to convert this string with <template>, the document fragment content for it is empty. The HTML <template> holds the inner elements within a document fragment and html-react-parser doesn't seem to replicate that data over. Is there any way to get access to that data?

For reference, it should contain this when inspecting the DOM:

image

Keywords

html, template, document, fragment

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions