Issue #1578✓ SolvedOpened November 14, 2018by mathiasbc3 reactions

Custom request on "src" attributes

Quick answerby artf2

Hi @mathiasbc by using the latest https://github.com/artf/grapesjs/releases/tag/v0.14.43 It should work with something like this

Read full answer below ↓

Question

I implemented a small GrapesJS editor that allows to edit Django/Jinja2 templates. GrapesJS by default is trying to GET the image preview of my element: <a href="{{producturl}}" target="blank"><img src="{{imageurl}}" width="130"/></a> The request happens everytime I load the template into the GrapesJS editor: http://localhost:8000/%7B%7Bimageurl%7D%7D 404 (Not Found) GrapesJS editor though works fine even with this 404 call. But I would like to do handle the request to the image. So instead of GrapesJS making a default call to http://localhost:8000/%7B%7Bimage_url%7D%7D I would like to render...

Answers (3)

👍 Most helpfulartfNovember 22, 2018

Hi @mathiasbc by using the latest https://github.com/artf/grapesjs/releases/tag/v0.14.43 It should work with something like this

artfNovember 17, 2018

Hi Mathias, currently the only possibility I see now is to extend the image component and its render() method. Probably I'll add some new component event to make such a case easier to manage

lock[bot]November 22, 2019

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 →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.