grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

[Question]: Load html content from a file dynamically

Open rohanreddyg opened this issue 8 years ago • 4 comments

Hi, I need to load content from a html file from server onto editor after or while initializing editor. How this can be implemented? HTML will have regular html content i.e HTML tag, script tags, css links and body content which needs to be loaded into editor.

StoreManager api documentation is limited and looks like default load looks for a specific JSON structure with separate html, css as data.

Thanks in advance.

rohanreddyg avatar Apr 21 '18 07:04 rohanreddyg

StoreManager api documentation is limited and looks like default load looks for a specific JSON structure with separate html, css as data.

Because this is the right way of loading template data, but if this is the first time you load a template you can place all the HTML inside html key instead of components (by leaving it empty) and the editor will use it

artf avatar Apr 22 '18 11:04 artf

StoreManager api documentation is limited and looks like default load looks for a specific JSON structure with separate html, css as data.

Because this is the right way of loading template data, but if this is the first time you load a template you can place all the HTML inside html key instead of components (by leaving it empty) and the editor will use it

can you give me simple example with basic html in json reponse ?

suresh5 avatar Dec 10 '18 09:12 suresh5

@suresh5 can you please avoid making requests on closed issues...

artf avatar Dec 11 '18 22:12 artf

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.

lock[bot] avatar Dec 12 '19 00:12 lock[bot]