Options:
object
optional
body:NodeOptions
| (callout
) =>NodeOptions
The body node of the callout.
optional
callouts:string
[] |null
A list of callout types that are supported.
undefined
, all callout types are supported. This means that this plugin will not check if the given callout type is in callouts
and never call onUnknownCallout
.callouts
, this plugin will call onUnknownCallout
.
optional
foldIcon:NodeOptionsWithChildren
|string
| (callout
) =>NodeOptionsWithChildren
|string
|undefined
The fold icon node of the callout.
The fold icon node is added in the title node after the title text.
undefined
, no fold icon is added.string
, the string is added as HTML in the title node after the title text.object
, the object is added as a node after the title text.
optional
icon:NodeOptionsWithChildren
|string
| (callout
) =>NodeOptionsWithChildren
|string
|undefined
The icon node of the callout.
The icon node is added in the title node before the title text.
undefined
, no icon is added.string
, the string is added as HTML in the title node before the title text.object
, the object is added as a node before the title text.
optional
onUnknownCallout: (callout
,file
) =>Callout
|undefined
A function that is called when the given callout type is not in callouts
.
undefined
, the callout is ignored. This means that the callout is rendered as a normal blockquote.Callout
, the callout is replaced with the returned Callout
.Parameter | Type |
---|---|
callout | Callout |
file | VFile |
Callout
| undefined
optional
root:NodeOptions
| (callout
) =>NodeOptions
The root node of the callout.
optional
title:NodeOptions
| (callout
) =>NodeOptions
The title node of the callout.
optional
titleInner:NodeOptions
| (callout
,options
) =>NodeOptions
|undefined
The inner title node of the callout.
This node is used to wrap the text content of the title.
If undefined
, title text is not wrapped.
Example output:
If a object
, the object used as a node to wrap the title text.
Example output with options { tagName: "div", properties: { dataCalloutTitleInner: true } }
: