[Question] not escape html characters in textNodes?
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 #2337
[BUG / QUESTION] Deleting default styles does not work
Hello, i'm trying to delete some of the default styles of the blocks. I wrote everything I changed in a plugin. I used this function to upd...
Issue #2378
[QUESTION] Modifying global CSS in style manager
We want to achieve the following:Mark our block HTML elements with some classes like:Add some styles that define CSS classes like:Using Gra...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.