Issue #2428πŸ’¬ AnsweredOpened Nov 25, 2019by aarangara0 reactions

Font not loading when using with webpack - grapesjs is trying to load fonts with relative path

Quick answerby artf

i.e. the html file is at /public/editor/demo.html and the files output by webpack are located as /public/js/ (bundle.js and font files) - so if I copy font files to /public/editor/fonts/ it works fine. Well I think from this sentence is quite clear that the issue is where webpack places fonts (probably you just need t...

Read full answer below ↓

Question

I am trying to load grapesjs editor in a simple html file and it does not load the grapesjs own icons or the fontawesome icons. Now, I looked into these 2 issues #2320 and #1474 but they did not help me in resolving my problem, hence I am raising it. Below is my source script (demo.js) which is then used by webpack to package it up as `bundle.js My webpack configuration is as below : I can see that when I run webpack to bundle everything, it creates the `bundle.js and also outputs the font files .woff, .svg for both main and fontawesome icons etc. But when I try to use them in my html, it alw...

Answers (1)

artfβ€’ Nov 29, 2019

i.e. the html file is at /public/editor/demo.html and the files output by webpack are located as /public/js/ (bundle.js and font files) - so if I copy font files to /public/editor/fonts/ it works fine. Well I think from this sentence is quite clear that the issue is where webpack places fonts (prob...

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 β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.