Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Wrattler

Main entry point that can be used for creating new Wrattler notebook instances. You can use getDefaultLanguages to get default language plugins implemented in core Wrattler and createNotebook to create a new notebook instance.

Hierarchy

  • Wrattler

Index

Methods

createExternalLanguagePlugin

  • createExternalLanguagePlugin(language: any, serviceUrl: string, faClass?: undefined | string, defaultCode?: undefined | string): ExternalLanguagePlugin
  • Creates a new LanguagePlugin instance which delegates binding and evaluation to a specified language service. You can pass the returned LanguagePlugin to the createNotebook function to get a notebook supporting this language.

    Parameters

    • language: any
    • serviceUrl: string
    • Optional faClass: undefined | string
    • Optional defaultCode: undefined | string

    Returns ExternalLanguagePlugin

createNamedNotebook

  • Creates a Wrattler notebook that loads notebooks automatically by requesting the index.md URL from the domain where it is hosted (or another.md when the current URl contains ?another in the query string).

    Parameters

    Returns Promise<WrattlerNotebook>

createNotebook

  • Given initial Markdown source code and a dictionary with language plugins, create a new instance of Wrattler and render it in a given HTML document element.

    Parameters

    • elementID: string

      HTML document element to be used for rendering the notebook.

    • content: string

      Initial source code for the notebook in Markdown.

    • languagePlugins: LanguagePlugins

      Language plugins to be used, typically the result of getDefaultLanguages

    Returns Promise<WrattlerNotebook>

getDefaultLanguages

Generated using TypeDoc