:: libs :: js-as-form :: as-form-jscolor

Library index

Plugin: “as-form-jscolor”

This AS.form plugin is a wrap to jscolor.

Jscolor is © 2008–2020 Jan Odvárko.

Developed and maintained by balestra

Licensed under Creative Commons Attribution 4.0 License for free personal/professional/commercial use, with attribution.

Includes jscolor.

Version 1.2, released on 2020-11-10

Provides

Fields of type:

The double class name is intentional: other plugins, loaded before or after this one, could re-define field type color.

Load plugin

Plugin URI: https://cdn.altersoftware.org/js-as-form/plugin/as-form-jscolor.js

Plugin name: jscolor

jscolor

asForm.addField( fieldname, 'jscolor', {options…} )

In alternative: asForm.addField(fieldname,'color', {options…} )

Generates a text field with a color picker, with its own WYSIWYG editor.

Common option keys can be used, in addition:

Notes:

  1. Color format is by default rgba
  2. If color format supports alpha channel (rgba) the related slider will be included.
  3. If the field isn’t mandatory skipempty option is set automatically.

Version history