HTML type color
HTML type color
Hi,
Can editor support <input type='color'/> html form control ?
I tried to add the following field without success : {label: "Couleur :", name: "color", type:'color'}
Can you point me to a quick and easy solution to acheive a color picker inside editor ?
Thank you,
Tristan
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I'm trying to have a form control like this one : http://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_color
I made a plugin for that :
'''
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery', 'datatables', 'datatables-editor'], factory);
}
else if (typeof exports === 'object') {
// Node / CommonJS
module.exports = function ($, dt) {
if (!$) {
$ = require('jquery');
}
factory($, dt || $.fn.dataTable || require('datatables'));
};
}
else if (jQuery) {
// Browser standard
factory(jQuery, jQuery.fn.dataTable);
}
}(function ($, DataTable) {
'use strict';
}));
'''
Thanks, this helped me.
You can use the
attroption of theinputtype:Allan