MathType Web Integrations → Documentation → Development guide → Trying out the demos in development mode
By default, these demos download the latest version of the MathType plugins from npm. This document explains what to do if you are modifying the source code of the plugins in this repo, and want to try that out instead.
All the commands can be executed either from the root of the project, or from the demo path. We recommend running them on the project root to avoid complexity.
The following editors require a license key:
- CKEditor4: Mandatory
- Froala: Optional
For that reason, you'll need to create an env
file with those keys or add them to your existing .env
file. Follow the example below:
CKEDITOR4_API_KEY=XXXXXX
froala_API_KEY=XXXXXX
Assuming that you already executed the yarn
command, you'll have to build the desired package and start the demo:
If the editor gets stuck loading click here
$ nx build <EDITOR>
$ nx start <FRAMEWORK>-<EDITOR>
In case you haven't installed
nx
, you'll have to addyarn
at the beginning of each one of the previous commands.
FRAMEWORK | Editor and Version | EDITOR/PACKAGE |
---|---|---|
html | CKEditor V4 | ckeditor4 |
html | CKEditor V5 | ckeditor5 |
html | Froala | froala |
html | Generic integration | generic |
html | TinyMCE V5 | tinymce5 |
html | TinyMCE V6 | tinymce6 |
vue | CKEditor V5 | ckeditor5 |
Each time you apply a change to a package and want to see the changes in your demo, you'll have to re-run the previous two commands.
In order to apply the changes made in the source code on this repo automatically to the started demo, you will need to activate the Hot reload feature:
- Run the demo with local packages with the command:
If the editor gets stuck loading click here
$ nx start <FRAMEWORK>-<EDITOR>
- Open a second terminal.
- Use the command:
$ nx start <EDITOR>
This feature only works with demos that use the HTML
Framework.
- If the editor is not loading, try the following steps:
- Delete the
dist
folder of the<EDITOR>
you are trying to deploy. - Re-run the command
nx start <FRAMEWORK>-<EDITOR>
if you are using the hot reload feature, ornx start <EDITOR>
if you are not.
- Delete the