JavaScript/jQuery ColorBox - fieldAddons

Specifies ColorBox input field addons.

Type:

FieldAddons

| null
Default Value: null

Field addons are custom markup containers that you can add to either side of the ColorBox input field. The component arranges visual elements in the following order: beforeTemplate, ColorBox input, afterTemplate.

index.js
  • $('#color-box-container').dxColorBox({
  • fieldAddons: {
  • beforeTemplate(data, element) {
  • element.append(
  • $('<i>').addClass('dx-icon-chevronprev'),
  • );
  • },
  • afterTemplate(data, element) {
  • element.append(
  • $('<i>').addClass('dx-icon-chevronnext'),
  • );
  • },
  • },
  • })

afterTemplate

A custom markup that displays content to the right of the input field.

Type:

template

Template Data:

Object

Data of the selected editor item.

beforeTemplate

A custom markup that displays content to the left of the input field.

Type:

template

Template Data:

Object

Data of the selected editor item.