Issue #778πŸ’¬ AnsweredOpened Jan 18, 2018by ghena0 reactions

Save to db data-gjs-droppable

Quick answerby artf

@ghena you should store HTML/CSS for the final result, for the editor you have to rely on JSON format I think it would be better for you using the built-in remote storage instead of a custom one Check also #597

Read full answer below ↓

Question

Hi guys, I need to solve a problem. Saving html grapejs strip all data-gjs- from html. Exists a way to maintain all data-gjs- before save editor html ? Infact if i save my template all data-gjs-droppable is missing and in a next render it doens load data-gjs-droppable attributes and son on. I save in this way: editor.Commands.add ('save-db', { run: function(editor, sender) { //var html = editor.runCommand('gjs-get-inlined-html'); var html = editor.getHtml(); var css = editor.getCss(); var customBlocks = $($.parseHTML(html)).find('.custom-block'); var postids = []; var params = {css:css,html:...

Answers (3)

artfβ€’ Jan 19, 2018

@ghena you should store HTML/CSS for the final result, for the editor you have to rely on JSON format I think it would be better for you using the built-in remote storage instead of a custom one Check also #597

shareefhiasatβ€’ Jun 19, 2018

@artf how to save with remote end point with inlined html mode , i mean html and css into html sent to server ? thanks

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 β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.