Issue #4654πŸ’¬ AnsweredOpened Oct 11, 2022by malonecj0 reactions

Custom component for text node including special characters

Quick answerby artf

Hi @malonecj I'm not sure how exactly you would expect to see and manage those components (especially when you combine templates inside conditions) but I think your current approach in isComponent is not properly correct as you have to deal with text nodes. Inside your liquid handle isComponent you use el.textContent...

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v105 Reproducible demo link https://codesandbox.io/s/fancy-brook-ppyc8v?file=/index.js Describe the bug Background: I am trying to configure grapesjs to be able to edit markup that contains the Liquid template language. As such I would like to create two types of custom components. A template block in the form of {{some_variable}}A condition block in the form of {% if condition .... %} The custom components should later be configured to allow the user to modify certain aspects of the compon...

Answers (3)

artfβ€’ Oct 20, 2022

Hi @malonecj I'm not sure how exactly you would expect to see and manage those components (especially when you combine templates inside conditions) but I think your current approach in isComponent is not properly correct as you have to deal with text nodes. Inside your liquid handle isComponent you...

artfβ€’ Nov 3, 2022

I'm closing this one as there are no issues with the core itself, if you have any other questions @malonecj let me know.

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @malonecj. Great suggestion about Custom component for text node including special characters! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: Listen to selector:add...

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.