Options
All
  • Public
  • Public/Protected
  • All
Menu

Semantic Math Editor Docs

The development version of the Semantic Math Editor contains compiled code and typescript typings.

You can use the editor from typescript, javascript or even directly from HTML pages.

Installation

It can be installed via NPM:

npm i semantic-math-editor

Getting started

All the public API is contained in the semantic-math-editor module.

There are three main factory methods:

createEditor

createRenderableEditor

createAPI

In most cases you will only need the first one to create editor and bind it to the HTML DOM element.

The rest two allow to create editors without binding it to the DOM model. The editors created without the DOM models have limited functionality.

The createEditor functions returns MathEditor object.

You can use it to:

  • Manipulate the editor via API
  • Subscribe/unsubscribe to the editor's events
  • Get and set the current math expression from/to the editor in the different formats

So the basic typescript snippet is:

import {createEditor,MathEditor} from "semantic-math-editor";

//Get or create HTML element (like div)
const element = document.getElementById('my-id');

const editor = createEditor(element);

It is important to include several things in the HTML head section. At least include Katex CSS and set charset to UTF-8

<head>
    <meta http-equiv="Content-Type" content="text/html" charset="utf-8" />

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css"
          integrity="sha256-uT5rNa8r/qorzlARiO7fTBE7EWQiX/umLlXsq7zyQP8=" crossorigin="anonymous">

</head>

Further reading

Please click semantic-math-editor link below to read its documentation.

Please note that the work on documentation is currently in progress.

In case of any question, ask us at business@softaria.com

Index

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc