Issue #1115šŸ’¬ AnsweredOpened May 15, 2018by Lethrir1 reactions

Core:canvas-clear removes CSS Composer Styles

Quick answerby artfā¤ 1

Hi @Lethrir as you can see this is the command and the behavour is totally intended. This also shows you how ridiculously the command is, so you can create your own via Commands API I'd also suggest to create blocks with their own styles, just to keep thing modular and independent (in that case you'll gonna care less...

Read full answer below ↓

Question

I am using the core:canvas-clear command assigned to a button but when this is pressed, the styles setup through the CSS Composer are also being removed. Grape Version: 0.14.15 Browser: Chrome 66.0.3359.139 (Official Build) (64-bit) I have setup a script to recreate this at https://jsfiddle.net/pzacf7zg/ Reproduction steps: Drag a 'Foo Block' to the canvas Observer that the block is styled Click the Trash icon to clear the canvas Drag a new 'Foo Block' to the canvas Observe that the styling is not applied this time Refresh the page Observe that the previously un-styled element has become styl...

Answers (2)

artf• May 18, 2018

Hi @Lethrir as you can see this is the command and the behavour is totally intended. This also shows you how ridiculously the command is, so you can create your own via Commands API I'd also suggest to create blocks with their own styles, just to keep thing modular and independent (in that case you...

lock[bot]• September 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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.