Skip to content

makeSiMarkdownOptions Type documentation

TypeScript declaration

import { makeSiMarkdownOptions } from '@siemens/element-ng/markdown';

makeSiMarkdownOptions(): SiMarkdownOptions

Types Documentation

import { SiMarkdownOptions } from '@siemens/element-ng/markdown';

Options for the markdown renderer. This holds all configuration and allows installing extensions. A number of extensions are already ready to use and shipped with Element.

Example:

import { siMarkdownMathKaTeX } from '@siemens/element-ng/markdown/extensions/math';
import remarkGemoji from 'remark-gemoji';

protected markdownOptions = new SiMarkdownOptions()
  .installExtension(siMarkdownMathKaTeX())
  .installUnifiedPlugin(remarkGemoji);
<si-markdown [markdown]="markdownText()" [options]="markdownOptions" />
Constructor
Methods
import type { UnifiedPlugin } from '@siemens/element-ng/markdown';
import type { TypeHandler } from '@siemens/element-ng/markdown';

Type handler for a named type. This can be an AST node type, a code type, a directive name

Properties
import type { SiMarkdownExtension } from '@siemens/element-ng/markdown';

An extension to the si-markdown component

Properties
import type { SiMarkdownHighlighter } from '@siemens/element-ng/markdown';

SiMarkdownRoot

Omit<Root, 'children'> & { children: ExtendedRootContent[]; references?: { footnoteDefinitions?: Map<string, FootnoteDefinition>; definitions?: Map<string, Definition>; }; }
type alias
import type { SiMarkdownRoot } from '@siemens/element-ng/markdown';

Extended root with references

import type { SiMarkdownMetadata } from '@siemens/element-ng/markdown';

Options passed to makeProcessor()

import type { SiMarkdownExtensionComponent } from '@siemens/element-ng/markdown';

Interface an extension component must implement

Properties
import type { ComponentWithOptions } from '@siemens/element-ng/markdown';

A combination of a component and options passed to it during run-time

Properties
import type { PluginWithOptions } from '@siemens/element-ng/markdown';

Combination of unified plugin with options

Properties
import type { SiMarkdownHighlighterComponent } from '@siemens/element-ng/markdown';

Interface a code highlighter component must implement

Properties
import type { ExtendedRootContent } from '@siemens/element-ng/markdown';
import type { SiMarkdownCitation } from '@siemens/element-ng/markdown';

Citation metadata associated with a markdown response.

Properties
import type { Footnotes } from '@siemens/element-ng/markdown';

Extra node for collecting all footnotes

Properties
  • List of children.

    children: FootnoteDefinition[] Inherited from Parent

  • Info from the ecosystem.

    data?: Data Inherited from Node

  • Position of a node in a source document.

    Nodes that are generated (not in the original source document) must not have a position.

    position?: Position Inherited from Node

  • Node type.

    type: "footnotes" Inherited from Node

import type { Citations } from '@siemens/element-ng/markdown';

Container for one or more adjacent citation nodes.

Properties
  • children: Citation[]

  • Info from the ecosystem.

    data?: Data Inherited from Node

  • Position of a node in a source document.

    Nodes that are generated (not in the original source document) must not have a position.

    position?: Position Inherited from Node

  • Node type.

    type: "citations" Inherited from Node

import type { DirectiveNode } from '@siemens/element-ng/markdown';

AST node created by remark-directive.

Properties
  • Attributes declared on the directive.

    attributes: Record<string, string | undefined>

  • List of children.

    children: RootContent[] Inherited from Parent

  • Info from the ecosystem.

    data?: Data Inherited from Node

  • The directive name without its leading colons.

    name: string

  • Position of a node in a source document.

    Nodes that are generated (not in the original source document) must not have a position.

    position?: Position Inherited from Node

  • Node type.

    type: "containerDirective" | "leafDirective" | "textDirective" Inherited from Node

import type { SourceReference } from '@siemens/element-ng/source-chip';

Definition of a single source

Properties
import type { Citation } from '@siemens/element-ng/markdown';

Inline node that references an item in the source citation array.

Properties
  • citationIndex: number

  • Info from the ecosystem.

    data?: Data Inherited from Node

  • Position of a node in a source document.

    Nodes that are generated (not in the original source document) must not have a position.

    position?: Position Inherited from Node

  • Text replaced by a position-based citation.

    text?: string

  • Node type.

    type: "citation" Inherited from Node


Except where otherwise noted, content on this site is licensed under MIT License.