Color input does not update the element on page
@art i think the issue here is that inside function setValue(val, opts = {}) of InputColor.js does not call the change event inside spectrum. looks like it needs to be separated out.
Read full answer below βQuestion
when using the color picker everything works fine.
however if you add a hex value to the input and press enter the color preview updates but the color is not applied to the element on the page
Answers (3)
@art i think the issue here is that
colorEl.spectrum('set', valueClr);
inside function setValue(val, opts = {}) of InputColor.js does not call the change event inside spectrum. looks like it needs to be separated out.
@artf i have been looking at this quite a bit and managed to get it working but the way i have done it seems a little hacky. The issue i found was inside src\domain_abstract\ui\InputColor.js inside setValue(val, opts = {}). the value opts.targetUpdate is undefined after the second loop. I added the...
@sonnylloyd actually the real issue is here https://github.com/artf/grapesjs/blob/dev/src/domain_abstract/ui/Input.js#L24-L27 should be instead: I've already made this change in the latest RC, you can see it working here http://grapesjs.com/demo-no-jq.html
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4618
Color input with no hash does not update color picker
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://code...
Issue #727
Two devices with same width
Hi all, We have an scenario where we need to have two devices with same width. Almost everything works fine, but when we try to change betw...
Issue #1092
[BUG]traits and storage trigger
Hey, maybe it's not bug, i'm not sure. I have traits with changeProp: true field. When I change the value of trait by UI, model is changed...
Issue #1357
[Bug]: Body -> Decorations -> Background-image
Version 0.14.25 | Local copy GrapesJS Tested in: Chrome 68, Firefox 61 Add a background image in "Body (Selected #wrapper) -> Decorations -...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline β both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.