[FEATURE REQUEST]: JSON to HTML parsing
Question
Is there any support for JSON to HTML rendering, so that we can get control over the content to be published in the newsletter or webpage. Rather than rendering direct HTML in the editor.
Answers (3)
You can put all your separate pieces of content in the blockmanager making it ready to be dragged in a template.
Instead of
blockManager.add('new-block', {
label: 'My label',
content: '<section data-attr="some-value"><h1>Hello!<h1></section>',
})
You can do this
blockManager.add('new-block', {
label: 'My label',
content: {
tagName: 'section',
attributes: { 'data-attr': 'some-value' },
components: [{
tagName: 'h1',
content: 'Hello!',
}]
},
})
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1743
[FEATURE REQUEST] Add command to get actual template imported into editor
Hi Team, We are using grapesjs newsletter plugin in our project for importing and preview the template. We are facing some difficulty in re...
Issue #1744
[FEATURE REQUEST] Add Command to get actual template imported
Hi Team, We are using grapesjs newsletter plugin in our project for importing and preview the template. We are facing some difficulty in re...
Issue #1431
Load HTML file from remote
I hosted my html content in cloud. Then trying to load the html content in the editor I found the error: "Response to preflight request doe...
Issue #1890
[QUESTION] Disable Drag Feature, Not Ability
I want to create my own dragging and placement abilities. I love grapesjs, but really want more control over how dragging elements work in...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.