Closed JoLoZ closed 4 years ago
Well a lot of things depend on your backend and there I can't help you, but if you need to replace the canvas with a new template you would use something like this
editor.setComponents(`<p>Imagen some content here. Get creative!</p>
<style>
</style>`)
Hello there, I am trying to use GrapesJS for template customization for my end users, but ran in the following problem: There is no documented way which I can replace all of the content with something like a function.
I tried redirecting, but that, well... redirects.
What I have: -An exact copy of the demo page (I couldn't get the main thing running yet, but it's good enough for testing.) -Static .html files where I pull the templates from -A small script that catches URL arguments and tries to replace the content with the file from the
base
parameter. -PHP 7.4 (Could also switch to a bunch of other versions, including PHP 5) -An external catalogue, which redirects the browser to the editor with thebase
parameter set.The content is comming like this: