#im trying to parse answer but i not able to parse image ,inline math and svg please help me guys
23 messages · Page 1 of 1 (latest)
steps.forEach((step) => {
step.blocks.forEach((block) => {
if (block.type === 'TEXT') {
stepsHtml += `<div>${block.block.editorContentState.blocks[0].text}</div>`;
const mathContent = ""; // MathJax content
// const htmlContent = "<p>This is an HTML paragraph.</p>"; // HTML content
// Append both MathJax and HTML content within <div> tags
stepsHtml += `<div>${mathContent}${htmlContent}</div>`;
}
if (block.type === 'EXPLANATION') {
stepsHtml += `<ol>`;
block.block.editorContentState.blocks.forEach((listItem) => {
if (listItem.type === 'unstyled') {
stepsHtml += `<li>${listItem.text}</li>`;
}
});
stepsHtml += `</ol>`;
}
});
}); ```
```js
your code here
```
your question also doesn't really make any sense
I assume you're using all these strings with innerHTML. you probably shouldn't.
@pliant holly
im making discord bot who scrap answer from website but in my answer mathjax and image not support
these is actual answer which i try to parse
zero amount of the information you've given is actually helpful
U want to send full code?
I'm very grateful to you if you helped me
you need to at least share relevant code, yes. you should also attempt to better-describe the problem.
sir im trying to scrape answer from website but it was only able to scrap text not able to scrape image and math syntax
see these answer which i get after scrap
these answer which i try to scrape see difference in my answer
none of your code is scraping anything. so yes, show more code.