Customize Blocks Styles - grapesjs Angular
Question
I am new to grapes js , I am trying to make the blocks in a different style when dragging for example the image blocks 1 - when not dragged or hover takes style A . 2- when hover takes style B . 3- When dragged takes style C (when it is over the canvas).
can any one help me with this issue .
Thanks

Answers (3)
Maybe with this events you can do it: https://grapesjs.com/docs/api/editor.html#blocks or https://grapesjs.com/docs/api/editor.html#canvas
In such a case, probably a completely custom block manager UI is the only way (eg. rendered by your own BlockManager component in Angular). It should be possible already, but I'd prefer to take my time and update the Blocks documentation with all the steps and examples necessary to build the BlockManager UI from scratch.
In such a case, probably a completely custom block manager UI is the only way (eg. rendered by your own BlockManager component in Angular). It should be possible already, but I'd prefer to take my time and update the Blocks documentation with all the steps and examples necessary to build the BlockManager UI from scratch.
Thanks for your response, I have other questions:
1- I am trying to add div with some style inside the canvas but it will not be editable or dragged just read-only, it is possible?
2- can I change the position of RTE as panel action on a fixed position.
Thank you very much, I would be glad if you answered my questions
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2235
Styles are overriding when new styles are added for different device
Great project.. I'm trying to integrate this and I have this issue. Assuming I have a style for Desktop already and I add a new style for m...
Issue #2917
BUG: Style Manage does not hide style blocks
Hey @artf, I'm trying to hide style properties based on the selected element. for example, when I drag and drop an image on my GrapesJS, I...
Issue #1380
How can i make elements absolutely positioned on canvas by default when dropped.
Grapejs is what i have been looking for over a long time now. Though by default, all elements are relatively positioned when dropped on the...
Issue #2541
[Question] Assign style to class not ID
What I'm trying to achieve is whenever the "block" inside of the canvas is edited the style isn't added to an #id but instead added to a cl...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.