Issue #1096💬 AnsweredOpened May 9, 2018by dsgh0 reactions

Support rendering layouts which are not part of the editable content

Quick answerby artf

For the point 1 you can pass this to your init options: Point 2, what about something like a custom placeholder component which just overwrites toHtml method in the model definiton

Read full answer below ↓

Question

Basically my use case is that I want to show a whole page - with header, menu(s) and footer - in the editor canvas, but only allow the user to edit the actual content of it. The reasoning behind this is so that the users can see the page as close as it will be to the "end product". I've been able to accomplish something like this by rendering the full page into the wrapper, using the fromElement option, and taking care to set highlightable, badgable and all the other such attributes to false on the elements belonging to the layout, but still this is not ideal as:The root node in the "Layer Ma...

Answers (3)

artfMay 10, 2018

For the point 1 you can pass this to your init options: Point 2, what about something like a custom placeholder component which just overwrites toHtml method in the model definiton

artfMay 18, 2018

Hey @dsgh, did you manage to accomplish your task?

dsghMay 18, 2018

@artf These past few days I've been busy working on other extensions to grapesjs that we're also needing. Thank you for your suggestions here - I'll investigate more about the showWrapper option, and I think your suggestion for point 2 is spot on! I should have thought of doing that. I'll return to...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.