Issue #665💬 AnsweredOpened December 20, 2017by SwithFr1 reactions

Custom component and save

Quick answerby SeongwoonHong1

The problem with src is here What I think you just should do is to create a custom view where you disable the pointer events on the inner img (eg. in render, in this way you'll always select the img-link model) and then on openModal pass the inner img model as a target @artf Could you provide some code example by any...

Read full answer below ↓

Question

Sorry, me again ! I'm trying to save my template with my new component "img-link" : But when I save my template using the gjs-get-inlined-html command (it's a newsletter template) it doesn't save the src of my image. Can you help me please ?

Answers (3)

SeongwoonHongFebruary 25, 2019

The problem with src is here What I think you just should do is to create a custom view where you disable the pointer events on the inner img (eg. in render, in this way you'll always select the img-link model) and then on openModal pass the inner img model as a target @artf Could you provide some...

SwithFrDecember 20, 2017

In fact it's seem that the problem comes from the isComponent. My component is detected with his className 'img-link' and the type 'img-link' is return and so re-rendered.

artfDecember 21, 2017

My component is detected with his className 'img-link' and the type 'img-link' is return and so re-rendered.

isComponent is used only when an HTML is parsed, so I'm not sure it's the case. What do you get with a simple getHtml? Are you able to provide the live demo of your case?

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.