josdejong / josdejong/jsoneditor

wrong style when click color tag

Open
#989 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
12.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

![image](https://user-images.githubusercontent.com/18723460/82190321-712e8280-9923-11ea-871d-61c58755d31a.png)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.