Issue #1329✓ SolvedOpened August 1, 2018by inventorbit4 reactions

How to use same CSS for Multiple pages

Quick answerby cjpollard3

This should work. `var editor = grapesjs.init({ keepUnusedStyles: true, ... });`

Read full answer below ↓

Question

Hello Grapejs Team, We've been working on Multi-page Website Builder. For each project there will be multiple html pages with single common "style.css" page. I am lazy loading each page with the following function - for handling multiple page loads The above page loads the page properly however, if page is empty or different from previous page it removes certain CSS classes. It's not perfectly loading the entire css file. Am I missing something? How can I have a common CSS file? Whether there is any workaround. Please help me with this issue. Thanks for your great work and support :)

Answers (3)

👍 Most helpfulcjpollardAugust 1, 2018

This should work. var editor = grapesjs.init({ keepUnusedStyles: true, ... });

artfAugust 2, 2018

@inventorbit next time, if someone solves your issue, close it

inventorbitAugust 1, 2018

@cjpollard Thank you very much :) It's working. You saved my time...

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.