josdejong / josdejong/jsoneditor
wrong style when click color tag
- Dominant language
- JavaScript
- Stars
- 12.3k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description

```
this.options = {
mode: 'tree',
modes: ['code', 'text', 'tree', 'preview'],
onChangeText: this.props.onChangeText,
onChangeJSON: this.props.onChangeJSON,
popupAnchor: document.getElementById('anchor'),
onColorPicker: function (parent, color, onChange) {
new JSONEditor.VanillaPicker({
parent: parent,
color: color,
editor:true,
popup:'left',
onChange: function (color) {
console.log('onChange', color)
var alpha = color.rgba[3]
var hex = (alpha === 1)
? color.hex.substr(0, 7) // return #RRGGBB
: color.hex // return #RRGGBBAA
onChange(hex)
},
onDone: function (color) {
console.log('onDone', color)
},
onClose: function (color) {
console.log('onClose', color)
}
}).show();
}
};
this.jsoneditorFn = new JSONEditor(this.container, this.options);
```
Contributor guide
Assessment
This issue has not been assessed yet.