GrapesJS / preset-newsletter

GrapesJS preset configuration for the newsletter editor.
https://grapesjs.com/demo-newsletter-editor.html
BSD 3-Clause "New" or "Revised" License
193 stars 143 forks source link

get-inlined-html command is removing characters from styling #130

Closed DewaldBodenstein closed 1 year ago

DewaldBodenstein commented 1 year ago

I'm having a problem with the get-inlined-html command. We have some text values that are replaced at a later stage within the generated HTML. Notice the {SITE_COLOR} that is used as a background color. In the styles object it is correct but in the HTML returned by the command it is removing the last curly brace.

GrapesJS Json:

{
   "assets":[
...
   ],
   "styles":[
...
      {
         "selectors":[
            "#iv675"
         ],
         "style":{
            "background-color":"{SITE_COLOR}",
            "color":"{SITE_TEXT_COLOR}",
            "text-align":"left",
            "vertical-align":"middle",
            "font-size":"14px"
         }
      },
...
   ],
   "pages":[
...
   ]

Inline HTML:

...
<td id="iv675" style="box-sizing: border-box; background-color: {SITE_COLOR;" bgcolor="{SITE_COLOR">
...
artf commented 1 year ago

Seems to be related to juice parser, so try to investigate there