Issue #890💬 AnsweredOpened February 22, 2018by ekennedy800 reactions

I cannot get the simple example working

Quick answerby maxtacco

I suggest you clone one of the examples using Git and run it using NPM commands included in the project. In your example above I would check the paths to grapes.min.css and grapes.min.js files - make sure you do not get 404 - Not found.

Read full answer below ↓

Question

I am not new to Javascript but when I try the example:

<link rel="stylesheet" href="path/to/grapes.min.css">
<script src="path/to/grapes.min.js"></script>
<div id="gjs"></div>
<script type="text/javascript">
  var editor = grapesjs.init({
      container : '#gjs',
      components: '<div class="txt-red">Hello world!</div>',
      style: '.txt-red{color: red}',
  });
</script>

I get a blank page. That is with adding the CSS and Javascript library. Any suggestions on getting this up and running? Looks like an outstanding project!

Answers (3)

maxtaccoFebruary 22, 2018

I suggest you clone one of the examples using Git and run it using NPM commands included in the project. In your example above I would check the paths to grapes.min.css and grapes.min.js files - make sure you do not get 404 - Not found.

artfMarch 1, 2018

Try with this instead

ekennedy80March 11, 2018

Okay, I am building a CMS using JSF 2.2 and I cannot get a simple example working in the web application. But if I test an example using a simple file and browser I can get it to work. Has anyone had any experience using grapsejs with JSF? I cannot get an simple example to work in a JSF environment...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.