type
LinkProcessor
src
@Js
const mixin LinkProcessor
A mixin to decide how links/images are handled
When inline parsing is run, each parsed link/image is passed to the processor. This includes links like these:
[text](destination) [text] [text][] [text][label]
And images
![text](destination) ![text] ![text][] ![text][label]
See LinkInfo
for accessing various parts of the parsed link/image
The processor can then inspect the link/image and decide what to do with it by returning the appropriate LinkResult
. If it returns null, the next registered processor is tried. If none of them apply, the link is handled as it normally would.
methods
process |
|
---|
Slot Details
process
src
abstract LinkResult? process(LinkInfo info, Scanner scanner, InlineParserContext cx)
info
: information about the parsed link/image scanner
: the scanner at the current position aftger the parsed link/image cx
: context for inline parsing
Return what to do with the link/image, e.g. do nothing (try next processor), wrap the text in a node, or replace the link/image with a node.