Issue #1466💬 AnsweredOpened September 27, 2018by sfkazmi0 reactions

Editing Saved html editor.setComponents slider load issue

Quick answerby sfkazmi

i got a way to fix it, I directly passed the html and css content in <div>.

Read full answer below ↓

Question

I am working on a project where i integrated grapesJs for users to build there templates, save them in database and edit these saved templates. I recently added slider plugin and now user can create templates but when edit i cause issue with javascript, I am using editor.setComponents when a user edit template and adding saved html in editor.setComponent('<saved html>') and css in editor.setStyle('<saved style>'), Now when there is some kind of javascript in saved html like slider javascript and when comes the apostrophe (') in javascript it breaks the script and throw exception, i can manula...

Answers (3)

sfkazmiSeptember 28, 2018

i got a way to fix it, I directly passed the html and css content in <div>.

sfkazmiSeptember 28, 2018

I got a new issue, when i pass the css in <div> to render it and html, i change the style and get it with editor.getCss(); it gets the old style that i passed into style tag in <div>

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.