Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Documentation

MathType Web Integrations → Documentation

Mono-repository for the MathType Web plugins and their dependencies.

MathType Events

To capture events triggered by MathType editor, use the next code:

// Capture onModalOpen event triggered when MT/CT editor is open
let modalOpenListener = window.WirisPlugin.Listeners.newListener('onModalOpen', () => {
  ... // Your callback function
});
window.WirisPlugin.Core.addGlobalListener(modalOpenListener);

List of Global Events

  • onModalOpen() Triggered when MT/CT editor modal is open
  • onModalClose() Triggered when MT/CT editor modal is close

Table of contents

Requirements

Using this project requires having git, Nx and yarn installed:

  • Follow this guide to install yarn.
  • Follow this guide to install git.
  • Run the following command, in your project directory, to install Nx: yarn global add nx.

For Windows users

This project runs shell commands not compatible among different OS.

To prevent that, you need to run the commands in the git bash instead of the windows one.

Structure

This repository has a monorepo structure. This means that the source code of multiple npm packages is stored in a single git repository. Some of these packages depend on each other, so storing them together allows for a faster development cycle. In order to manage multiple packages, we use Nx as a cornerstone of the project structure.

The main functionality of Nx is bootstrapping. Bootstrapping consists of linking to the local source code of the dependencies instead of downloading them from npm. This allows us to make live changes to some dependency and see how it affects another package without having to publish the dependency to npm.

The most important files and folders are:

  • docs. The main documentation for the project. You can see the stable version rendered here.
  • packages. The source code of the plugins, as well as their common API known as the "devkit". Each folder contains one npm package. All the usual npm commands work inside.
  • demos. A growing set of demos to help developers integrate these plugins on different scenarios.
  • scripts. Scripts used for different development tasks.
  • resources. Resources files that are needed for the publish workflow.

First steps

Cloning the repository

You can clone this repo as follows:

$ git clone https://github.com/wiris/html-integrations

Bootstrapping

After cloning the repo, run the following command on the project root:

$ yarn

This will bootstrap the packages using Yarn and Nx.

Next steps