JSON object to specify what to annotate inside content
.
- The
key
(s) will be used to search for placeholder - The configuration object (This page will focus on the available options in the configuration)
► Quick Example:
► Source Code:
Config Options
Option | Type | Default Value | Description |
---|---|---|---|
*type | string | "string" | type defines - Styling of the annotation (powered by highlight.js) - Input knob if knob is not defined |
*knob | string | "string" | knob defines the input knob e.g. select , date and color |
*value | any | undefined | The (default) value passed to the annotation placeholder and the input knob |
title | string | the key of the annotation | If provided, the title will override the annotation key to be rendered in the popup |
description | string | undefined | If provided, the description will be rendered under the knob |
type
type
defines
- Styling of the annotation. This part is powered by highlight.js' CSS themes
- Input type if
knob
is not defined.- The following
type
s include a default input knobstring
boolean
number
- Optional:
min
andmax
- Optional:
integer
- Optional:
min
andmax
- Optional:
- The other
type
s would use astring
input knob, ifknob
is not defined
- The following
Available options are mirrored from highlight.js' CSS class, which could be found here (opens in a new tab).
► Example:
► Source Code:
Inside the popup, type is also shown here (e.g. type: 'boolean'
)
knob
knob
defines custom input knob other than the basic
string
, boolean
, number
and integer
types.
Some knob
needs to supplement other options e.g.
for knob: 'select'
, you also need to pass the available options
.
select
- Required:
options
- Required:
date
- Optional:
min
andmax
- Optional:
time
datetime-local
- Optional:
min
andmax
- Optional:
range
- Required:
min
andmax
- Required:
color
► Example:
► Source Code:
value
value
is the (default) value to render in the placeholder. See examples in type or knob.
title
If provided, the title will override the annotation key to be rendered in the popup
► Example:
► Source Code:
description
If provided, the description will be rendered under the knob
► Example:
► Source Code: