jola-cms-parser
v1.1.0
Published
This is the custom cms block parser component for use with Jola Interactive core.
Downloads
3
Readme
CMS Block Parser
This is the custom cms block parser component for use with Jola Interactive core.
Usage:
import Parser from 'jola-cms-parser';
export const ParentComponent = (props) => {
let cmsBlocks = {
items: [
{
identifier: "block identifier", //from Magento
content: `<div>
<h1>Some title</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus in justo ultricies massa lobortis finibus id sed nisi. Nulla vel mauris sit amet risus dictum laoreet sit amet non nunc. Donec mi diam, aliquam a volutpat quis, pharetra eu leo. Aliquam eu purus consectetur, vehicula dui consequat, iaculis lacus.</p>
</div>`
},
]
}
return (
<div>
<Parser
data={cmsBlocks}
/>
</div>
)
}
NOTE: It is important that the data being sent to the Parser is in the exact defined structure above, otherwise the parser will not work.