Custom components based on Link block with a default href
@csb346 you can define a new custom component type: and then use it inside a block: just remember you must define your custom component type inside a plugin Cheers!
Read full answer below ↓Question
Hi! I have a GrapesJS integration on a laravel project with custom components directly on the page (each block is supposed to be block link to a content). So far I replicated the block link component like that So far so good. But I need that each of these components has his own href defined by default. No matter if it's editable or not. Something like this: href: 'http://url.com/content/{{ $content->id }}', Can't find the solution. Any idea? Thanks
Answers (1)
@csb346 you can define a new custom component type: and then use it inside a block: just remember you must define your custom component type inside a plugin Cheers!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2961
Components in custom modal isn't editable
Hello, I'm trying to add custom modal block to my project and I want to change content of this modal also with drag&drop. Here's code of my...
Issue #6685
Custom component styles are not applied after deletion and re-addition
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v143.0.7499.193 Reproducible demo l...
Issue #3207
Form is not submitting
I am trying to create as custom block. But the form is not submitting when i use components inside content. I am able to get all the form d...
Issue #3309
TextNodes interfere when changing content on element
Version: 0.16.44 Hi @artf I have a custom block with a custom button component, which its content is similar to this one. <a data-gjs-type=...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.
Tutorial
GJS.Market Is Now Available for India 🇮🇳
GJS.Market is expanding its global presence with a dedicated experience for developers, agencies, SaaS companies, and digital creators in India
Tutorial
How to Build an AI-Powered Page Builder with GrapesJS in 2026
What we learned building GJSDocs — from simple AI text generation to structured, context-aware visual editing
Tutorial
How Much Does It Cost to Build a SaaS Page Builder in 2026?
How much does it cost to build a SaaS page builder in 2026? Explore realistic development costs, timelines, features, and how using GrapesJS can reduce
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.