Hello
I have a question : is it possible to edit the color values, or add additional colors into the sceditor colorpicker ?
Ive searched the entire jscripts/sceditor/ directory, but couldnt find anything usefull.
Thank you
Hi,
it's in the jquery.sceditor.min.js file.
If you unminify/beautify it, you'll find:
color: {
_dropDown: function(b, c, d) {
var e, g, h, i, j = {
r: 255,
g: 255,
b: 255
},
k = a("<div />"),
l = b.opts.colors ? b.opts.colors.split("|") : new Array(21),
m = [],
n = f.color;
if (!n._htmlCache) {
for (e = 0; e < l.length; ++e) {
for (i = l[e] ? l[e].split(",") : new Array(21), m.push('<div class="sceditor-color-column">'), g = 0; g < i.length; ++g) h = i[g] || "#" + j.r.toString(16) + j.g.toString(16) + j.b.toString(16), m.push('<a href="#" class="sceditor-color-option" style="background-color: ' + h + '" data-color="' + h + '"></a>'), g % 5 === 0 ? (j.g -= 51, j.b = 255) : j.b -= 51;
m.push("</div>"), e % 5 === 0 ? (j.r -= 51, j.g = 255, j.b = 255) : (j.g = 255, j.b = 255)
}
n._htmlCache = m.join("")
}
k.append(n._htmlCache).find("a").click(function(c) {
d(a(this).attr("data-color")), b.closeDropDown(!0), c.preventDefault()
}), b.createDropDown(c, "color-picker", k)
},
exec: function(a) {
var b = this;
f.color._dropDown(b, a, function(a) {
b.execCommand("forecolor", a)
})
},
tooltip: "Font Color"
},
(2018-12-12, 12:59 PM)NoRules Wrote: [ -> ]Hi,
it's in the jquery.sceditor.min.js file.
If you unminify/beautify it, you'll find:
Thanks, now the question how to add addition colors, looks pretty complex