Issue #1408💬 AnsweredOpened September 6, 2018by Siddharth-ss422791 reactions

Why Text element converted into box ??

Quick answerby artf1

@Siddharth-ss42279 If you need to EDIT the template created from GrapesJS, you SHOULD NOT USE ITS HTML.... you should import its JSON... so you're doing it WRONG It's like doing this and then complaining why your el doesn't have click listener anymore... you're just ripping off all the information created by the edito...

Read full answer below ↓

Question

Hi @artf , I am using grapesjs newsletter plugin with ckeditor plugin. I dragged TEXT element in canvas and did some editing with ckeditor. i have connected it to database. when ever i save content in database after reloding the editor i set content value from database field and after that TEXT element get converted into BOX. dont know why TEXT element is changing to BOX and also ckeditor in not loading in that BOX element ?? Please help me out in this.

Answers (3)

artfSeptember 11, 2018

@Siddharth-ss42279 If you need to EDIT the template created from GrapesJS, you SHOULD NOT USE ITS HTML.... you should import its JSON... so you're doing it WRONG It's like doing this and then complaining why your el doesn't have click listener anymore... you're just ripping off all the information...

artfSeptember 7, 2018

What do you store in your database? The HTML and CSS?

Siddharth-ss42279September 7, 2018

Hi @artf Actually, i get in-lined html using command editor.Commands.get('gjs-get-inline-html').run(editor) and saving it to database and for rendering content i am using editor.setComponent(content_field) problem is when i render content from database the TEXT element gets converted into BOX eleme...

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.