The main class Katex Input Helper

Hierarchy-Diagram

UML class diagram of KatexInputHelper
Legend
icon for a class in the UML class diagram class
icon for an interface in the UML class diagram interface
icon for a public property in the UML class diagram public property
icon for a public method in the UML class diagram public method

Hierarchy (view full)

Implements

Constructors

Properties

allowedCtrlKeys: number[] = ...
autoUpdateOutputTimeout: any = null
baseLocation: string = ""
cmSelector: string = ".cm-editor"
codeMirrorEditor: ICodeMirror = null
codeType: string = 'Latex'
cursorAtInsertionPoint: boolean = false
customEquationsToggler: any = null
documentations: any = null
hints: IHints = null
latexMathjaxCodesListLoaded: boolean = false
localizer: ILocalizer = null
math: IMath = null
menus: IMenus = null
messager: IMessager = null
notAllowedAltKeys: any[] = []
notAllowedCtrlKeys: any[] = []
notAllowedKeys: number[] = ...
panels: IPanels = null
parameters: any = null
parser: IParser = null
platformInfo: any = null
rtlStyle: string = 'ltr'
runNotColorPicker: boolean = true
runNotVirtualKeyboard: boolean = false
services: ISelectedServices = null
sidemenuData: any = {}
symbolPanelsLoaded: any[] = []
themes: IThemes = null
unicodeToggler: any = null
url: any = null
utilities: IUtilities = null
versions: any = null
VKI_show: any = null

Accessors

Methods

  • Html-encodes string for attributes (quotes only).

    Parameters

    • s: any

    Returns string

  • Convert text to boolean. Only "true" is truthy.

    Parameters

    • text: string

    Returns text is "true"

  • Wrapper of the Localizer routine.

    Parameters

    • TEXT_CODE: string

    Returns string

  • Using the traditional (desktop) menu, extracts data for the side menu.

    Returns any

  • Initialise the Code Mirror Editor.

    This includes:

    • instance creation with parameters
    • change handler -> auto update of formula
    • context menu binding

    Returns Promise<void>

  • Initializes the Equation from the parameters. This includes copying it to the editor and displaying it in the output field.

    Returns void

  • Initializes the differences of mobile / desktop variant.

    Parameters

    • mobile: boolean

      true in the mobile variant.

    Returns Promise<void>

  • Initialises all configuration parameters including start time initialisation and change handlers.

    Returns void

  • The routine equips the entries in the given panel with functionality.

    This is:

    • tool tip
    • info line
    • click event

    Parameters

    • fPanelID: string

    Returns Promise<void>

  • Initializes the User Interface.

    This includes:

    • assignes menu commands
    • prepares the accordion panels with symbol templates
    • prepares the info dialog
    • assigns button handlers
    • additional handlers ...

    Returns Promise<void>

  • Initializes an accordion (several palettes with symbols).

    Parameters

    • accordionID: string

    Returns void

  • Initializes one of the "MORE" dialogs.

    Parameters

    • fPanelID: string

      the panel id (this is the panel from which the more dialog is originating)

    Returns Promise<void>

  • Initializes the virtual keyboard by loading a script.

    Returns Promise<void>

  • Logs some properties of the element selected by the selector.

    Parameters

    • selector: string

      the selector

    Returns void

  • Handles context menu invocation. Workaround for crashs no longer necessary because context menus use a copy of the menu.

    Parameters

    • selector: string

      the selector of the html element which caused the event

    • event: any

      the event

    Returns boolean

  • This is the observer for Language changes, it switches the language of the UI.

    It does this by:

    • setting document language
    • setting the RTL style
    • localize all entries of the UI (using span[locate])

    Parameters

    Returns Promise<void>

  • Handles menu clicks of the main menu. This handler performs an additional handling of the side menu.

    Parameters

    • item: any

      the clicked menu item

    Returns Promise<void>

  • The style chosen is set up for the UI.

    Parameters

    • style: string
    • _rtlStyle: string
    • colorType: string

    Returns void

  • Registers events for a window and opens it. This whole effort is done to get the window position and size persisted.

    Parameters

    • id: string

      the HTML id of the window

    Returns Promise<void>

  • The initiated file open action, implemented by clicking on an anchor element.

    Parameters

    • event: any

    Returns void

  • Activates information tabs on the information dialog.

    Parameters

    • numTab: number

      number (index) of the tab (0..3)

    Returns Promise<void>

  • Registers events for a window and opens it. This whole effort is done to get the window position and size persisted. Delegated to the panels instance.

    Parameters

    • id: string

      the HTML id of the window

    Returns Promise<void>

  • Populates a side menu in a wrapper menu panel for reduced space.

    Parameters

    • data: any

      the data structure used to describe the menu

    Returns void

  • A Prefetch cycle to load the required HTML document. The intent is to load the mobile or desktop version depending on configuration.

    Returns Promise<boolean>

    true, if a document could be loaded

  • Adapt UI to code type. (Latex or Ascii). For correct display of header only.

    Returns void

  • Registers handlers for the mobile case like click handlers and swipe handlers.

    Returns Promise<void>

  • Sets the base location.

    This will be needed for relative paths of some content like css or html files. This method is only called once in constructor.

    Returns string

  • Updates the RTL flag after the language resource is updated.

    Evt transfer this functionality to Themes.

    Returns void

  • Opens the Matrix window with given rows and columns values.

    Parameters

    • rows: number

      the number of matrix rows

    • cols: number

      the number of matrix columns

    Returns void

  • Menu command to open a file with formula. Checks, if FileReader is present and if so, initiates a file open action.

    Returns void

  • Updates a few dialogs with formulae.

    The candidates here are:

    • the panels of the info dialog
    • the equation dialog
    • the special characters dialog

    Returns Promise<void>

  • Wrapper of the appropriate Math routine. Updates the math in the output window.

    Returns void