-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Hooks
Nicolas CARPi edited this page Sep 2, 2021
·
1 revision
If you need a hook in apidoc-core please add your hook and provide a pull request.
How to add a hook into apidoc-core view source code.
How to use hook in your plugin view.
Called on each found element. Returns a new list of elements (replace elements). Used to inject annotationes from an external schema.
Parameter: (elements, element, block, filename)
- {array} elements Found elements in a block without the current element.
- {array} element Contains the source, name (lowercase), sourceName (original), content.
- {string} block Current source block.
- {string} filename Current filename.
File: parser.js
Function: _findElements
Called on each found element and returns the modified element. Used to modify a specific element.
{name} is the found element.name (lowercase).
Parameter: (element, block, filename)
- {array} element Contains the source, name (lowercase), sourceName (original), content.
- {string} block Current source block.
- {string} filename Current filename.
File: parser.js
Function: _findElements