Not escape html characters in textNodes?
Yeah sure, you can extend the textnode component and use your toHTML function
Read full answer below ↓Question
Hi,
We are using some Twig template features in our grapesjs implementation. like: {% if variable == "value" %}<b>text</b>{% endif %}
But due to the toHtml() function in src/dom_components/model/ComponentTextNode.js this gets converted into {% if variable == "e;value"e; %}<b>text</b>{% endif %}
Is there an easy way to not replace these values in a textNode or replace the function with our own toHtml function ?
Btw it used to be: (which would've been awesome for us) toHTML() { return this.get('content'); }
Answers (1)
Yeah sure, you can extend the textnode component and use your toHTML function
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2184
[QUESTION] Losing predefined media queries
Hi. I have a predefined json of a template which contains a set of html elements and styles which are parsed into the set of components upo...
Issue #1341
[Question] How to work with Custom Components
Hello, I have some questions and issues about and with the grapes editorProblem 1 In a component, which class is there extended? Is it real...
Issue #3832
The css classes are removed and the autogenerated ids for each html tags gets changed ( Example : ivj5m-2) after each reload
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link Not there De...
Issue #3447
javascripts are not working due to encoding issue
1 - I copied Typed text components code instead of demo HTML code; 2 - And added allowScripts: 1; You can see example here: http://bashworl...
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 →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.