mixinafFandoc::ElemProcessor
afFandoc::ElemProcessor
@
Js
An interface for processing Fandoc elements.
- cssLinkProcessor
static ElemProcessor cssLinkProcessor()
A link processor that allows URIs to be prefixed with CSS class names and styles. Don't forget to also use the CssLinkResolver to avoid invalid links.
- cssPrefixProcessor
static ElemProcessor cssPrefixProcessor()
A para processor that allows text to be prefixed with CSS class names and styles.
- externalLinkProcessor
static ElemProcessor externalLinkProcessor()
A link processor that opens external links in a new tab.
- fromFn
static new fromFn(|HtmlElem->Obj? fn)
Creates a
PreProcessor
from the given fn.- html5VideoBsProcessor
static ElemProcessor html5VideoBsProcessor(Str? videoAttrs := null)
An image processor that inlines (locally hosted) HTML 5 videos.
videoAttrs
defaults tomuted playsinline controls
.- html5VideoElProcessor
static ElemProcessor html5VideoElProcessor(Str? videoAttrs := null)
An image processor that inlines (locally hosted) HTML 5 videos.
videoAttrs
defaults tomuted playsinline controls
.- invalidLinkProcessor
static ElemProcessor invalidLinkProcessor(Str cssClass := "invalidLink")
Adds the CSS class to the elem. Use for processing invalid links.
- mailtoProcessor
static ElemProcessor mailtoProcessor(Str attr := "data-unscramble")
Removes
mailto:
hrefs and adds adata-unscramble
attribute.- pdfLinkProcessor
static ElemProcessor pdfLinkProcessor()
Opens links to PDFs in a new tab.
- process
abstract Obj? process(HtmlElem elem)
Implement to process / alter / modify the given
HtmlElem
. Return a replacementStr
orHtmlElem
.- vimeoBsProcessor
static ElemProcessor vimeoBsProcessor()
An image processor that inlines Vimeo videos. Renders Bootstrap CSS classes.
- vimeoElProcessor
static ElemProcessor vimeoElProcessor()
An image processor that inlines Vimeo videos. Renders EveryLayout for Slim CSS classes.
- youTubeBsProcessor
static ElemProcessor youTubeBsProcessor()
An image processor that inlines YouTube videos. Renders Bootstrap CSS classes.
- youTubeElProcessor
static ElemProcessor youTubeElProcessor()
An image processor that inlines YouTube videos. Renders EveryLayout for Slim CSS classes.