vue3-math-editor

A semantic equation editor for Vue 3: WYSIWYG equations rendered with KaTeX, exported as Content MathML (CellML-ready), MathJSON and LaTeX.
3,308
Install
npm install vue3-math-editor
Latest Version:0.3.5
Vue:3
License:Apache-2.0
Last Updated:Oct 13, 2026
Links: GitHub  ·  npm
Maintainer: hsorby

vue3-math-editor

A semantic equation editor for Vue 3: equations are edited WYSIWYG, rendered with KaTeX, and exported as MathJSON, Content MathML (optionally ready for CellML 2.0) and LaTeX.

Documentation

See docs/:

The demo (yarn dev) checks units with libCellML through the vue3-libcellml.js plugin: load a CellML units file (or press Example), give the variables units, and problems are underlined as you type. Open it with ?nolibcellml to run it without the plugin, and ?cellml for CellML-mode MathML.

Recommended IDE Setup

VS Code + Vue (Official) (and disable Vetur).

Recommended Browser Setup

Customize configuration

See Vite Configuration Reference.

Using it in an application

yarn add vue3-math-editor vue primevue katex primeicons
// main.ts: install PrimeVue with a theme, and import the styles
import 'katex/dist/katex.min.css'
import 'primeicons/primeicons.css'
import 'vue3-math-editor/style.css'
<script setup lang="ts">
import { EquationWorkbench, type EquationLine } from 'vue3-math-editor'
</script>

See Component interface for the props, events and the units checker.

Project Setup

corepack enable                     # once: yarn comes from package.json's packageManager
yarn install
yarn playwright install chromium    # once, for the browser tests

Compile and Hot-Reload for Development

yarn dev

Build

yarn build        # the library, into dist/ (what is published to npm)
yarn build:demo   # the demo application, into dist-demo/

Run the Tests

yarn test         # unit tests (Vitest)
yarn test:e2e     # browser tests (Playwright)

Lint with ESLint

yarn lint

License

Apache-2.0

Related Packages

katex-vue3

katex use vue3

2,037
vatex

A plugin of vue latex(base on katex), support vue2 and vue3

11,153 47
@renovamen/vuepress-plugin-katex

A plugin for adding Katex to VuePress.

1,354 370
@agilehub/agile-latex-formula

Vue 3 LaTeX editor component with MathJax rendering, symbol library, and export...

0 0
vue-stream-markdown

Streaming markdown output, Useful for text streams like LLM outputs.

447,910 243

Version History

Version Released License
0.3.5 Apache-2.0
0.3.4 Apache-2.0
0.3.3 Apache-2.0
0.3.2 Apache-2.0
0.3.1 Apache-2.0