GrapesJS / preset-newsletter

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

How to integrate grapesjs-preset-newsletter plugin in project? #142

Open nzaeta opened 1 month ago

nzaeta commented 1 month ago

I'm having trouble with integrating the newsletter plugin in my project. I added these lines, but I don't see any blocks in the "Open Blocks" section, and there are much fewer options than in the demo: https://grapesjs.com/demo-newsletter-editor.html Maybe it is an older version?

<script src="https://unpkg.com/grapesjs"></script>
<script src="https://unpkg.com/grapesjs-preset-newsletter"></script>

Full code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Design Email</title>
    <link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet">
    <script src="https://unpkg.com/grapesjs"></script>
    <script src="https://unpkg.com/grapesjs-preset-newsletter"></script>

</head>
<body>
    <div id="gjs" style="height: 100%;"></div>

    <script type="text/javascript">
        const editor = grapesjs.init({
            container: '#gjs',
            plugins: ['gjs-preset-newsletter'],
            pluginsOpts: {
                'gjs-preset-newsletter': {}
            }
        });
    </script>
</body>
</html>
alaksandarjesus commented 1 month ago

I am having same issue. Can someone please shed some light

https://stackoverflow.com/questions/79039566/plugin-grapesjs-preset-newsletter-not-found

alaksandarjesus commented 1 month ago

It was problem with versioning. I downloaded from https://github.com/GrapesJS/grapesjs and used these js files. It worked like charm.

nzaeta commented 1 month ago

It was problem with versioning. I downloaded from https://github.com/GrapesJS/grapesjs and used these js files. It worked like charm.

Hi, could you tell me which are the files? That repo is main grape JS , not the newsletter plugin, is it?