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
knobis not defined.- The following
types include a default input knobstringbooleannumber- Optional:
minandmax
- Optional:
integer- Optional:
minandmax
- Optional:
- The other
types would use astringinput knob, ifknobis 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:
minandmax
- Optional:
timedatetime-local- Optional:
minandmax
- Optional:
range- Required:
minandmax
- 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: