Class responsible for Math Formula handling. The framework supported here is Katex. CodeMirror is the only supported Editor case.

Implements

Constructors

Properties

codeMirror: ICodeMirror = null
codeMirrorFactory: Factory<ICodeMirror> = null
dynamicPanels: any[] = []
encloseAllFormula: boolean = false
hints: IHints = null
katex: any = null
localizer: any = null
mathVisualOutput: any = null
menuupdateType: boolean = true
messager: any = null
parameters: any = null
parser: any = null

Methods

  • Determines if Display mode shall be enforced for given text.

    Parameters

    • text: string

      Given text to be checked

    Returns boolean

    A boolean indicating a required display mode for given formula

  • For some dialogs, which are initialized lazily, updates the Math.

    Parameters

    • selector: string
    • javascript: boolean = true

    Returns void

  • Inserts given text into Code Mirror Editor and updates the formula in the output.

    Parameters

    • b: string

      replacement for the selection in editor

    Returns void

  • The most basic insertion method. Inserts Math into given element.

    Parameters

    • text: string

      text bo be translated into math

    • element: any = null

      html element to be used for insertion

    • multiple: boolean = false

      if true inserts multiple math elements, separated by horizontal space

    • displayMode: boolean = false

      in display mode can handle expressions differently (for instance environments)

    Returns void

  • Sets the Focus to the Code Mirror Editor. Parameter OBSOLETE?

    Parameters

    • disableKeyboard: boolean = false

    Returns void

  • Updates an anchor (or other tag) with a formula. Takes the text from original anchor content.

    Parameters

    • a: any

      An anchor or other html element serving as source and target of the operation

    Returns void

  • Updates the headers of some Panels by translating contained Math. If a selector is given, it is assumed that it is a single panel from an accordion.

    Parameters

    • selector: string = ""

    Returns void

  • Updates the formula in the output field. Also writes the formula back to the parameters so to be returned by the dialog to its caller.

    Returns void

  • Updates Tables in Panels or Dialogs by translating contained Math. Although this is a Math method, it also updates some image references. TODO: implement SRP (single responsibility principle)

    Parameters

    • panelId: string

    Returns Promise<void>