Can i create multiple pages?
You can make use of the following When you change the page, at first you store the current template: and then you change the editor with the next one Reference Link: https://github.com/ronaldaug/gramateria/issues/2
Read full answer below ↓Question
This framework is great。It helped me a lot。 Now I want to create a project through this framework implementation that includes multiple pages. can you give me some adivce?
Answers (3)
You can make use of the following
{
current: 1,
pages: [
{ components: [], style: [] },
{ components: [], style: [] },
...
]
}
When you change the page, at first you store the current template:
const currentPage = pages[currentIndex];
currentPage.components = editor.getComponents();
currentPage.style = editor.getStyle();
and then you change the editor with the next one
const nextPage = pages[nextIndex];
editor.setComponents(nextPage.components);
editor.setStyle(nextPage.style);
Reference Link: https://github.com/ronaldaug/gramateria/issues/2
@inventorbit It's a really great solution
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 #1673
[Issue] Grapesjs not working when use with mobile devices(iphone,ipad)
First, thank you for creating this awesome framework @artf. I integrated this framework with my project and i want it to be used through mo...
Issue #1799
LeadPages - Thrive - Looking to integrate into Mautic a real designer of landing pages and email templates
Looking through docs - api to integrate into Mautic as a plugin to create forms and email templates. Any advice in tasking this? Anyone int...
Issue #1113
[QUESTIONS] New trait type is not working with rendered components?
Hello, thanks for the great framework. I'm trying to apply this to my project. I want to add a new trait for existing LINK '<a>' component....
Issue #1162
[Question]: Editable components in Handlebars rendered template
Hi, I've been using grapes for about a couple of days now. Thanks for the awesome work on this project. I've read through the API docs (hop...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.