markdown-it-anchor
- Version 9.2.0
- Published
- 136 kB
- No dependencies
- Unlicense license
Install
npm i markdown-it-anchoryarn add markdown-it-anchorpnpm add markdown-it-anchorOverview
Header anchors for markdown-it.
Index
Functions
function anchor
anchor: typeof anchor;Namespaces
namespace anchor
namespace anchor {}variable permalink
const permalink: { headerLink: (opts?: HeaderLinkPermalinkOptions) => PermalinkGenerator; linkAfterHeader: (opts?: LinkAfterHeaderPermalinkOptions) => PermalinkGenerator; linkInsideHeader: ( opts?: LinkInsideHeaderPermalinkOptions ) => PermalinkGenerator; ariaHidden: (opts?: AriaHiddenPermalinkOptions) => PermalinkGenerator;};interface AnchorInfo
interface AnchorInfo {}interface AnchorOptions
interface AnchorOptions {}property level
level?: number | number[];property permalink
permalink?: PermalinkGenerator;property tabIndex
tabIndex?: number | false;property uniqueSlugStartIndex
uniqueSlugStartIndex?: number;method callback
callback: (token: MarkdownItToken, anchor_info: AnchorInfo) => void;method getTokensText
getTokensText: (tokens: Token[]) => string;method slugify
slugify: (str: string) => string;method slugifyWithState
slugifyWithState: (str: string, state: MarkdownItState) => string;interface AriaHiddenPermalinkOptions
interface AriaHiddenPermalinkOptions extends PermalinkOptions {}interface HeaderLinkPermalinkOptions
interface HeaderLinkPermalinkOptions extends PermalinkOptions {}property safariReaderFix
safariReaderFix?: boolean;interface LinkAfterHeaderPermalinkOptions
interface LinkAfterHeaderPermalinkOptions extends PermalinkOptions {}property assistiveText
assistiveText?: (title: string) => string;property placement
placement?: 'before' | 'after';property space
space?: boolean | string;property style
style?: | 'visually-hidden' | 'aria-label' | 'aria-describedby' | 'aria-labelledby';property visuallyHiddenClass
visuallyHiddenClass?: string;property wrapper
wrapper?: [string, string] | null;interface LinkInsideHeaderPermalinkOptions
interface LinkInsideHeaderPermalinkOptions extends PermalinkOptions {}property ariaHidden
ariaHidden?: boolean;property placement
placement?: 'before' | 'after';property space
space?: boolean | string;interface PermalinkOptions
interface PermalinkOptions {}property class
class?: string;property renderAttrs
renderAttrs?: RenderAttrs;property renderHref
renderHref?: RenderHref;property symbol
symbol?: string;type PermalinkGenerator
type PermalinkGenerator = ( slug: string, opts: PermalinkOptions, state: State, index: number) => void;type RenderAttrs
type RenderAttrs = (slug: string, state: State) => Record<string, string | number>;type RenderHref
type RenderHref = (slug: string, state: State) => string;type State
type State = MarkdownItState;type Token
type Token = MarkdownItToken;Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (7)
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/markdown-it-anchor.
- Markdown[](https://www.jsdocs.io/package/markdown-it-anchor)
- HTML<a href="https://www.jsdocs.io/package/markdown-it-anchor"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3482 ms. - Missing or incorrect documentation? Open an issue for this package.
