SolidJSS
SolidJSโ€ข3y agoโ€ข
1 reply
Deva Kumar Kilim

Replacing specific HTML elements with Solid Components

Hey. I have a string with html markup, I want to replace some specific elements (based on some attributes) with a Component. How can I achieve this?

For example,

const htmlMarkupString = '<div><span id="replaceMe"></span></div>'

I want the span with id replaceMe to be replaced with a Solid Component

Can anyone please help me with this?
Was this page helpful?