'@' sign in class-attribute value of block content changes to '-' sign when using template literals
I'll update the escape function, for now you can provide your own via this option
Read full answer below ↓Question
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Firefox 108.0.2Reproducible demo link not possible in jsfiddleDescribe the bug grapesjs-cli - 3.0.1 grapesjs - 0.20.3 How to reproduce the bug?add a newblock with this template literal with a class attribute containing an @ signdrag the block into the work areathe following div element will be created:other possibility to reproduce: open the code with Import tool and change a class attribute to contain an @ sign. save it. And then when you repoen the Import Template dialog the @ sign is replaced by...
Answers (2)
I'll update the escape function, for now you can provide your own via this option
Thanks for reporting this, @agreif. Great question about '@' sign in class-attribute value of block content changes to '-' sign when using template literals. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4148
0.18.2 / 0.18.3 removes all on... HTML attributes when block is drag-dropped in the builder
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v99Reproducible demo link https://jsf...
Issue #6180
Trait's `setValue()` method not called when value changes
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome latest Reproducible demo link https...
Issue #6116
asDocument not working as expected
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 128 Reproducible demo link https://...
Issue #5689
<> is introduced at the beginning editor.getHtml()
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 121.0.6167.185 (Official Buil...
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
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Tutorial
GrapesJS vs Webflow vs Tilda (2026): Honest Comparison, Pricing & Which to Pick
GrapesJS vs Webflow vs Tilda compared head-to-head: real 2026 pricing, SEO features, code export, and which one actually fits your project
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.