Issue #1888💬 AnsweredOpened March 13, 2019by RobertoCorreale0 reactions

Add custom html inside canvas

Quick answerby artf

I think is because adding new nodes inside the canvas, grapes cannot calculate the correct order. Correct, the order is based on components in the model, not the view. So, just to be clear, that <label> you're adding in updateComponentView it's just for the canvas and you don't need in your JSON structure, correct?

Read full answer below ↓

Question

Hi there, I'm using grapes to export a custom json with all the information i need, instead of HTML and CSS. For doing that I'm parsing the gpjs-components stored on localStorage. Now iI need to customize how components are rendered inside canvas. For example I have an Input component with two traits (label and value), and i would like to render it inside the canvas with the label traits as <label> tag and value as placeholder inside <input> tag. Of course I can use a custom view, but doing that inside the localStorage will be saved also the label tag inside the object, but i would like to av...

Answers (3)

artfMarch 22, 2019

I think is because adding new nodes inside the canvas, grapes cannot calculate the correct order. Correct, the order is based on components in the model, not the view. So, just to be clear, that <label> you're adding in updateComponentView it's just for the canvas and you don't need in your JSON st...

no-response[bot]April 1, 2019

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we ne...

lock[bot]April 2, 2020

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.

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.