Issue #2725Opened April 21, 2020by Chewhern1 reactions

editor.getCss() issue with PHP when using Cookie to pass Css styles

Question

My company would like me to develop an automated no import(Not downloading zip and upload zip) template builder that can be used on Email marketing system.

Error

However whenever I tried to export the CSS to a server file through writing and creating the file without downloading it. The CSS just contains the one that I highlighted. All the unhighlighted CSS does not include in the file. Any idea on how to solve this?

Here's my coding Error2

Answers (3)

adamwpeApril 23, 20201 reactions

The StorageManager is only a mechanism to get the data to your endpoint in a nice format. I would see no reason why you then can't save it into a file if you wish. Just get the $_POST data, and then do file_put_contents.

Thanks Adam

adamwpeApril 23, 20200 reactions

Hi Chewhern,

Cookies can't hold a lot of information - something like 4k - so it will not be large enough to store CSS or HTML. You really need to use the Storage Manager.

https://grapesjs.com/docs/modules/Storage.html

Thanks, Adam

ChewhernApril 23, 20200 reactions

since you are here, I did like to know on the behavior of the storage manager, if I create a script to store those 2 data in server, can i do so without saving it directly to database? Cuz i have seen some of the people here save it directly to database.

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.