Issue #6249Opened October 23, 2024by yashvi20260 reactions

BUG: Intialized custom color picker

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome

Reproducible demo link


Describe the bug

editor.getModel().initBaseColorPicker(DomElement, { /* spectrum options */ });

after initailization when the palete opens i want to set a color to it ? @artf

Code of Conduct

  • I agree to follow this project's Code of Conduct

Answers (2)

NeonLexieOctober 24, 20240 reactions

This looks interesting. I wouldn't mind taking a crack at it.

yashvi2026October 24, 20240 reactions
I figured it out.



var configEl=editor.getModel().initBaseColorPicker(DomElement, { /* spectrum options */ });
 configEl.spectrum("set", "your color");

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.