Get started with grapesjs CDN

BSD-3-Clause licensed

GrapesJS is a open-source front-end web application framework for building dynamic web pages.

Tags:
  • wte
  • grapes
  • grapesjs
  • web
  • template
  • editor
  • site
  • builder
  • html
  • website
  • newsletter
  • wysiwyg

Stable version

Copied!

How to start using grapesjs CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with grapesjs CDN - cdnhub.io</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.21.9/css/grapes.min.css">
    <script src="https://cdn.cdnhub.io/grapesjs/0.21.9/grapes.min.js"></script>
    <style>
        #my-canvas { border: 1px solid black; }
    </style>
</head>
<body>
    <div id="my-canvas"></div>

    <script>
        const editor = new GrapesJS({
            container: '#my-canvas',
            plugins: ['html'],
            styles: {
                'p': { color: 'red' },
            },
        });

        editor.init();

        editor.insertHTML('<h1>Hello, GrapesJS!</h1>');
        editor.insertHTML('<p>This is a simple example using the GrapesJS library.</p>');
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions