@richhtmleditor/math 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +87 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ # @richhtmleditor/math
2
+
3
+ LaTeX and MathML equation plugin for Rich HTML Editor. Adds an **Insert Math** toolbar tool with a formula editor and live preview rendering for inline and display math blocks. Built on [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core).
4
+
5
+ **Current release: 1.1.1** — Depends on `@richhtmleditor/core` **^1.1.1**.
6
+
7
+ **Repository:** [github.com/rajkishorsahu89/richhtmleditor](https://github.com/rajkishorsahu89/richhtmleditor)
8
+
9
+ **Demo:** [richhtmleditor.vercel.app](https://richhtmleditor.vercel.app/) — [demo](https://richhtmleditor.vercel.app/demo) · [guide](https://richhtmleditor.vercel.app/guide) · [API](https://richhtmleditor.vercel.app/api)
10
+
11
+ ### What's in 1.1.1
12
+
13
+ - **`createMathPlugin`** — registers the `insertMath` toolbar tool
14
+ - **LaTeX input** — type LaTeX expressions with live rendered preview
15
+ - **MathML support** — renders MathML for standards-compliant output
16
+ - **Inline & display modes** — insert equations inline or as centered display blocks
17
+ - **Dark mode** — math editor respects editor dark mode tokens
18
+
19
+ > Community feature — no enterprise licence required.
20
+
21
+ **Keywords:** `richhtmleditor` `math` `latex` `mathml` `equations` `wysiwyg`
22
+
23
+ ## Install
24
+
25
+ ```bash
26
+ npm install @richhtmleditor/math
27
+ # Requires @richhtmleditor/core (via framework wrapper or direct install).
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ```ts
33
+ import { createEditor } from "@richhtmleditor/core";
34
+ import { createMathPlugin } from "@richhtmleditor/math";
35
+
36
+ const editor = createEditor({
37
+ element: host,
38
+ toolbar: { preset: "full" },
39
+ plugins: [createMathPlugin()]
40
+ });
41
+ ```
42
+
43
+ ### Angular
44
+
45
+ ```ts
46
+ import { createMathPlugin } from "@richhtmleditor/math";
47
+
48
+ plugins = [createMathPlugin()];
49
+ ```
50
+
51
+ ```html
52
+ <richhtmleditor [plugins]="plugins" [toolbar]="{ preset: 'full' }" />
53
+ ```
54
+
55
+ ### React
56
+
57
+ ```tsx
58
+ import { RichHtmlEditor } from "@richhtmleditor/react";
59
+ import { createMathPlugin } from "@richhtmleditor/math";
60
+
61
+ const plugins = [createMathPlugin()];
62
+
63
+ <RichHtmlEditor toolbar={{ preset: "full" }} plugins={plugins} />
64
+ ```
65
+
66
+ ## API
67
+
68
+ ### `createMathPlugin(options?)`
69
+
70
+ Returns an `EditorPlugin` that registers the `insertMath` toolbar tool.
71
+
72
+ | Option | Type | Description |
73
+ | --- | --- | --- |
74
+ | `defaultMode` | `"inline" \| "display"` | Default math block mode (default: `"display"`). |
75
+
76
+ ## Related packages
77
+
78
+ - [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core) — editor engine and plugins API.
79
+ - [`@richhtmleditor/themes`](https://www.npmjs.com/package/@richhtmleditor/themes) — shared CSS.
80
+ - [`@richhtmleditor/diagrams`](https://www.npmjs.com/package/@richhtmleditor/diagrams) — Mermaid diagrams plugin.
81
+ - [`@richhtmleditor/export`](https://www.npmjs.com/package/@richhtmleditor/export) — DOCX/PDF export plugin.
82
+ - [`@richhtmleditor/angular`](https://www.npmjs.com/package/@richhtmleditor/angular) — Angular wrapper.
83
+ - [`@richhtmleditor/react`](https://www.npmjs.com/package/@richhtmleditor/react) — React wrapper.
84
+
85
+ ## License
86
+
87
+ [MIT](./LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@richhtmleditor/math",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "LaTeX / MathML equation editor plugin for Rich HTML Editor (KaTeX / MathJax adapter).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "prepack": "node ../../scripts/assert-pack-ready.mjs"
19
19
  },
20
20
  "dependencies": {
21
- "@richhtmleditor/core": "^1.1.0"
21
+ "@richhtmleditor/core": "^1.1.1"
22
22
  },
23
23
  "keywords": ["richhtmleditor", "math", "latex", "katex", "mathjax", "equation"],
24
24
  "license": "MIT",