Interface NotebookConfig

interface NotebookConfig {
    HTML5EmbedAudioAttributes: string;
    HTML5EmbedIsAllowedHttp: boolean;
    HTML5EmbedUseImageSyntax: boolean;
    HTML5EmbedUseLinkSyntax: boolean;
    HTML5EmbedVideoAttributes: string;
    alwaysShowBacklinksInPreview: boolean;
    breakOnSingleNewLine: boolean;
    chromePath: string;
    codeBlockTheme: CodeBlockTheme;
    enableCriticMarkupSyntax: boolean;
    enableEmojiSyntax: boolean;
    enableExtendedTableSyntax: boolean;
    enableHTML5Embed: boolean;
    enableLinkify: boolean;
    enablePreviewZenMode: boolean;
    enableScriptExecution: boolean;
    enableTypographer: boolean;
    enableWikiLinkSyntax: boolean;
    frontMatterRenderingOption: FrontMatterRenderingOption;
    globalCss: string;
    imageFolderPath: string;
    imageMagickPath: string;
    includeInHeader: string;
    isVSCode: boolean;
    jsdelivrCdnHost: string;
    katexConfig: KatexOptions;
    krokiServer: string;
    latexEngine: string;
    markdownFileExtensions: string[];
    mathBlockDelimiters: string[][];
    mathInlineDelimiters: string[][];
    mathRenderingOnlineService: string;
    mathRenderingOption: MathRenderingOption;
    mathjaxConfig: JsonObject;
    mathjaxV3ScriptSrc: string;
    mermaidConfig: MermaidConfig;
    mermaidTheme: MermaidTheme;
    pandocArguments: string[];
    pandocMarkdownFlavor: string;
    pandocPath: string;
    parserConfig: ParserConfig;
    plantumlJarPath: string;
    plantumlServer: string;
    previewTheme: PreviewTheme;
    printBackground: boolean;
    protocolsWhiteList: string;
    puppeteerArgs: string[];
    puppeteerWaitForTimeout: number;
    revealjsTheme: RevealJsTheme;
    useGitHubStylePipedLink: boolean;
    usePandocParser: boolean;
    wikiLinkTargetFileExtension: string;
    wikiLinkTargetFileNameChangeCase: WikiLinkTargetFileNameChangeCase;
}

Properties

HTML5EmbedAudioAttributes: string

The audio attributes for HTML5 embed.

Default

controls preload="metadata"

HTML5EmbedIsAllowedHttp: boolean

Whether to allow HTTP protocol for HTML5 embed. *

Default

false
HTML5EmbedUseImageSyntax: boolean

Whether to use image syntax for HTML5 embed.

Default

true
HTML5EmbedUseLinkSyntax: boolean

Whether to use link syntax for HTML5 embed.

Default

false
HTML5EmbedVideoAttributes: string

The video attributes for HTML5 embed.

Default

controls preload="metadata"

alwaysShowBacklinksInPreview: boolean

Whether to always show backlinks in preview.

breakOnSingleNewLine: boolean

Whether to break on single new line.

If set to false, then two spaces at the end of line will be required to break a line.

Default

true
chromePath: string

The path of Chrome or Chromium.

This is used for puppeteer to generate pdf or images.

Default

''
codeBlockTheme: CodeBlockTheme

The code block theme.

Default

auto.css

enableCriticMarkupSyntax: boolean

Whether to enable critic markup syntax.

Default

false
enableEmojiSyntax: boolean

Whether to enable emoji syntax.

Default

true
enableExtendedTableSyntax: boolean

Whether to enable extended table syntax.

Default

false
enableHTML5Embed: boolean

Whether to enable HTML5 embed.

Note: This is dangerous and should be used with caution.

Default

false
enableLinkify: boolean

Whether to enable linkify.

Default

true
enablePreviewZenMode: boolean

Whether to enable preview zen mode. Enable this option will hide unnecessary UI elements in preview unless your mouse is over it.

enableScriptExecution: boolean

Whether to enable script execution.

Note: This is dangerous and should be used with caution.

Default

false
enableTypographer: boolean

Whether to enable typographer.

Default

false
enableWikiLinkSyntax: boolean

Whether to enable wiki link syntax.

Default

true
frontMatterRenderingOption: FrontMatterRenderingOption

The front matter rendering option.

Default

none

globalCss: string

Global custom CSS styles.

This will be inserted into HTML <style> tag.

Default

${notebookPath}/.crossnote/style.less or ''

imageFolderPath: string

The folder path for storing images.

Default

/assets

imageMagickPath: string

The path of ImageMagick.

This is used for converting svg to png.

Default

''
includeInHeader: string

The content to be included in HTML <head> tag. This is useful for adding custom styles or scripts.

isVSCode: boolean

Whether the current environment is VSCode.

Default

false
jsdelivrCdnHost: string

The host of jsdelivr CDN.

Default

cdn.jsdelivr.net

katexConfig: KatexOptions

Default

Defined in ${notebookPath}/.crossnote/configs.js or { macros: {} }

krokiServer: string

The Kroki server used to render diagrams.

Default

https://kroki.io

latexEngine: string

The latex engine.

Default

pdflatex

markdownFileExtensions: string[]

The files of extensions to be included in the notebook

Default

[".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".rmd", ".qmd"]
mathBlockDelimiters: string[][]

The math delimiters for block math.

For example, [["$$", "$$"]] will render $$x$$ as block math.

Default

[['$$', '$$']]
mathInlineDelimiters: string[][]

The math delimiters for inline math.

For example, [["$", "$"]] will render $x$ as inline math.

Default

[['$', '$']]
mathRenderingOnlineService: string

The online math rendering service used for markdown export.

Default

https://latex.codecogs.com/gif.latex

mathRenderingOption: MathRenderingOption

The math rendering option.

Default

KaTeX

mathjaxConfig: JsonObject

MathJax configuration.

https://docs.mathjax.org/en/latest/options/index.html

Default: Defined in ${notebookPath}/.crossnote/configs.js or

{
tex: {},
options: {},
loader: {},
}
mathjaxV3ScriptSrc: string

The script source for MathJax v3.

Default

https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

mermaidConfig: MermaidConfig

Mermaid configuration.

Default

Defined in ${notebookPath}/.crossnote/configs.js or { startOnLoad: false }

mermaidTheme: MermaidTheme

The mermaid theme.

Default

default

pandocArguments: string[]

The arguments for running the pandoc command.

Default

[]
pandocMarkdownFlavor: string

The pandoc markdown flavor.

Default

markdown-raw_tex+tex_math_single_backslash

pandocPath: string

The path of the pandoc command.

Default

pandoc

parserConfig: ParserConfig

Parser configuration.

Default

${notebookPath}/.crossnote/parser.js or {}

plantumlJarPath: string

The path of the plantuml.jar file.

The plantuml.jar file could be downloaded from https://sourceforge.net/projects/plantuml/

Default

''
plantumlServer: string

The PlantUML server.

If this is set, then plantumlJarPath will be ignored.

You run start a plantuml server by running:

$ docker run -d -p 8080:8080 plantuml/plantuml-server:jetty

Default

''
previewTheme: PreviewTheme

The preview theme.

Default

github-light.css

printBackground: boolean

Whether to print background for file export.

Default

false
protocolsWhiteList: string

The protocols white list.

Default

http://, https://, atom://, file://, mailto:, tel:

puppeteerArgs: string[]

The arguments for running puppeteer.

Default

[]
puppeteerWaitForTimeout: number

The timeout for puppeteer to wait for the page to be loaded.

Increase the timeout if the exported file is incomplete.

Default

0
revealjsTheme: RevealJsTheme

The reveal.js theme.

Default

white.css

useGitHubStylePipedLink: boolean

Whether to use GitHub style piped link.

  • GitHub style: [[ text | link ]]
  • Wiki style: [[ link | text ]]

Default

false
usePandocParser: boolean

Whether to use Pandoc parser.

Default

false
wikiLinkTargetFileExtension: string

The file extension for the link in wikilink if the link does not have an extension.

Default

'.md'
wikiLinkTargetFileNameChangeCase: WikiLinkTargetFileNameChangeCase

The case for the file name in wikilink. If the value is none, then the file name will not be changed. Otherwise, the file name will be transformed to the specified case. You can read https://www.npmjs.com/package/case-anything for more details.

Generated using TypeDoc