1

From Issue i create 10 Days ago i need help in solving ....

Hi

Explanation Am using news-letter-preset its cooool

Problem I have un desired behavior

More Info About The Problem Check below two links and try do export can you tell the difference here is a screen shot :)

with gjs-preset-newsletter plugin https://jsfiddle.net/shareefhiasat/Lup78L17/5/

with gjs-blocks-basic plugin https://jsfiddle.net/shareefhiasat/4q3kxthj/1/

So What ? Its the same fiddle ; the only difference is the plugin

What is Expected I expect no extra attributes like style to be added to the tag in my content

image

UPDATE

I could stop the style from appearing but there is extra double quotations now check this ( How like this by commenting css , ( i have no idea what is the impact of this so please advise ) ) image

Now Another Problem

image

These double quotations is wrong in free marker syntax render in back end .

@artf can you advise thanks

In Short Original code that must stay as is <#assign currentDate=. now></#assign>

Becomes

<#assign currentDate="." now="">

And this is wrong , throws exception , not correct syntax !

UPDATE

After alot of more tries, i decided to try adding it as component now its ok after i commented this line https://github.com/artf/grapesjs-preset-newsletter/blob/601ad471b29c2ffb08bc07ad9c8ecc0b6064dd21/src/openExportCommand.js#L44

And replace with

codeViewer.setContent(tmpl);

But still there is a problem which is </#list> dose not appear on screen or source of HTML why.

https://jsfiddle.net/3xhqkc96/12/

Update I tried here...

The parser here https://github.com/artf/grapesjs/blob/f74791da68b25d1037502a2ad06093da29e25830/src/parser/index.js#L49

Discardes my end tags for the free marker like </#list> </#assign>

I also traced the problem happens here

what is so special in this line !?

image

I tried in console check here the closing tag just gets commented!

image

Summary: I still cant get it working

shareef
  • 9,255
  • 13
  • 58
  • 89
  • did you find any solution regarding the commented issue? – Matthias Reisner Aug 24 '21 at 13:17
  • Yes i encapsulated the freemarker components to make them parge of the grapes js predefined components, example `<#list etc...` should be block called (show list of blah blah) then you may drag it and drop then it will work @MatthiasReisner – shareef Sep 06 '21 at 08:12
  • thank you for your response. I made it work by implementing a custom plugin with its own toHtml() logic. This made it work for my case. – Matthias Reisner Sep 06 '21 at 13:31

1 Answers1

0

Email Newsletter's / Templates generally doesn't support external CSS. So it is almost totally dependent on inline CSS. That's why using the newsletter plugin will change the way GrapeJS exports HTML and CSS and will provide you inlined HTML-CSS.