@formulaxjs/tinymce 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,35 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2024 FormulaX Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ ## Legacy KityFormula Code
26
+
27
+ Portions of FormulaX, specifically within the `@formulaxjs/kity-runtime` package,
28
+ contain code adapted from [KityFormula](https://github.com/BaiduFE/kityformula)
29
+ by Baidu FEX Team, originally released under the MIT License.
30
+
31
+ KityFormula-related code in FormulaX is retained under the same MIT License
32
+ and is subject to the copyright notice above.
33
+
34
+ For details on the original KityFormula project, see:
35
+ https://github.com/BaiduFE/kityformula
package/README.md ADDED
@@ -0,0 +1,277 @@
1
+ # @formulaxjs/tinymce
2
+
3
+ English | [简体中文](./README.zh-CN.md)
4
+
5
+ TinyMCE integration adapter for FormulaX.
6
+
7
+ `@formulaxjs/tinymce` registers FormulaX as a TinyMCE plugin and provides a modal-based formula editing experience for inserting and updating formulas inside TinyMCE content.
8
+
9
+ > Status: experimental. Public APIs may change before the first stable release.
10
+
11
+ ## Features
12
+
13
+ - TinyMCE plugin registration through `registerFormulaXTinyMcePlugin`
14
+ - FormulaX toolbar button and menu item support
15
+ - `FormulaXOpen` TinyMCE command for programmatic opening
16
+ - Insert and update formulas as non-editable inline nodes
17
+ - Double-click, Enter, and Space editing interactions for existing formulas
18
+ - TinyMCE compatibility layer for versions `>=5 <9`
19
+ - LaTeX persistence through `data-formulax-latex`
20
+ - Markup helpers for creating, parsing, serializing, finding, and replacing formula elements
21
+
22
+ ## Compatibility
23
+
24
+ The package declares TinyMCE as an optional peer dependency:
25
+
26
+ ```json
27
+ {
28
+ "tinymce": ">=5 <9"
29
+ }
30
+ ```
31
+
32
+ The adapter is designed for TinyMCE 5, 6, 7, and 8. Unsupported major versions will emit a console warning.
33
+
34
+ The workspace demo can dynamically load TinyMCE 5, 6, 7, or 8 from CDN for compatibility verification.
35
+
36
+ ## Install
37
+
38
+ When the package is published:
39
+
40
+ ```bash
41
+ pnpm add @formulaxjs/tinymce
42
+ pnpm add tinymce
43
+ ```
44
+
45
+ Inside the FormulaX workspace, use the workspace package directly:
46
+
47
+ ```bash
48
+ pnpm install
49
+ pnpm dev:tinymce
50
+ ```
51
+
52
+ ## Basic usage
53
+
54
+ Register the FormulaX TinyMCE plugin before calling `tinymce.init`:
55
+
56
+ ```ts
57
+ import tinymce from 'tinymce';
58
+ import { registerFormulaXTinyMcePlugin } from '@formulaxjs/tinymce';
59
+
60
+ registerFormulaXTinyMcePlugin(tinymce, {
61
+ toolbarText: 'FormulaX',
62
+ tooltip: 'Insert or edit formula',
63
+ modal: {
64
+ title: 'FormulaX Editor',
65
+ },
66
+ editor: {
67
+ mode: 'kity',
68
+ height: '100%',
69
+ autofocus: true,
70
+ render: { fontsize: 40 },
71
+ },
72
+ });
73
+
74
+ await tinymce.init({
75
+ selector: '#editor',
76
+ height: 420,
77
+ menubar: false,
78
+ plugins: 'formulax',
79
+ toolbar: 'undo redo | formulax',
80
+ license_key: 'gpl',
81
+ });
82
+ ```
83
+
84
+ Then users can click the `FormulaX` toolbar button to insert a formula. Existing formulas can be edited by double-clicking them or selecting them and pressing Enter or Space.
85
+
86
+ ## Programmatic opening
87
+
88
+ The plugin registers the `FormulaXOpen` command:
89
+
90
+ ```ts
91
+ editor.execCommand('FormulaXOpen');
92
+ ```
93
+
94
+ ## Custom plugin names
95
+
96
+ The default plugin, button, and menu item names are all `formulax`.
97
+
98
+ If you customize them, keep the TinyMCE `plugins` and `toolbar` configuration aligned with the custom names:
99
+
100
+ ```ts
101
+ registerFormulaXTinyMcePlugin(tinymce, {
102
+ pluginName: 'formulaXPlugin',
103
+ buttonName: 'formulaXButton',
104
+ menuItemName: 'formulaXMenuItem',
105
+ });
106
+
107
+ await tinymce.init({
108
+ selector: '#editor',
109
+ plugins: 'formulaXPlugin',
110
+ toolbar: 'formulaXButton',
111
+ });
112
+ ```
113
+
114
+ ## Formula markup helpers
115
+
116
+ Use markup helpers when you need to generate or inspect FormulaX formula nodes outside the plugin UI:
117
+
118
+ ```ts
119
+ import {
120
+ createTinyMceFormulaMarkup,
121
+ getFormulaLatexFromElement,
122
+ isFormulaElement,
123
+ replaceFormulaElement,
124
+ } from '@formulaxjs/tinymce';
125
+
126
+ const html = createTinyMceFormulaMarkup('\\sqrt{x}');
127
+
128
+ const element = document.querySelector('[data-formulax="true"]');
129
+ if (isFormulaElement(element)) {
130
+ const latex = getFormulaLatexFromElement(element);
131
+ replaceFormulaElement(element, `${latex}+1`);
132
+ }
133
+ ```
134
+
135
+ A generated formula node stores the source LaTeX in `data-formulax-latex` and is marked with `data-formulax="true"`:
136
+
137
+ ```html
138
+ <span
139
+ class="formulax-math"
140
+ data-formulax="true"
141
+ data-formulax-latex="\\sqrt{x}"
142
+ data-latex="\\sqrt{x}"
143
+ contenteditable="false"
144
+ data-mce-contenteditable="false"
145
+ style="cursor: pointer"
146
+ ></span>
147
+ ```
148
+
149
+ The exact generated markup is internal and may evolve. Consumers should rely on the exported helper functions where possible.
150
+
151
+ ## Options
152
+
153
+ ```ts
154
+ interface FormulaXTinyMceOptions {
155
+ pluginName?: string;
156
+ buttonName?: string;
157
+ menuItemName?: string;
158
+ toolbarText?: string;
159
+ tooltip?: string;
160
+ cursorStyle?: string;
161
+ formulaClassName?: string;
162
+ formulaAttributeName?: string;
163
+ renderMode?: 'text' | 'html';
164
+ initialLatex?: string;
165
+ modal?: FormulaXModalOptions;
166
+ editor?: FormulaXEditorOptions;
167
+ }
168
+ ```
169
+
170
+ | Option | Default | Description |
171
+ | --- | --- | --- |
172
+ | `pluginName` | `formulax` | TinyMCE plugin name registered through `tinymce.PluginManager.add`. |
173
+ | `buttonName` | `formulax` | Toolbar button name. |
174
+ | `menuItemName` | `formulax` | Menu item name. |
175
+ | `toolbarText` | `FormulaX` | Toolbar and menu item label. |
176
+ | `tooltip` | `Insert formula` | Toolbar button tooltip. |
177
+ | `cursorStyle` | `pointer` | Cursor style applied to generated formula nodes. |
178
+ | `formulaClassName` | `formulax-math` | CSS class used by generated formula nodes. |
179
+ | `formulaAttributeName` | `data-formulax-latex` | Attribute used to persist source LaTeX. |
180
+ | `renderMode` | `text` | Experimental render mode option. |
181
+ | `initialLatex` | empty string | Initial LaTeX when inserting a new formula. |
182
+ | `modal` | see below | Modal labels, dimensions, and closing behavior. |
183
+ | `editor` | see below | Embedded FormulaX editor options. |
184
+
185
+ ### Modal options
186
+
187
+ | Option | Default | Description |
188
+ | --- | --- | --- |
189
+ | `title` | `FormulaX` | Modal title. |
190
+ | `insertText` | `Insert` | Submit button text when inserting. |
191
+ | `updateText` | `Update` | Submit button text when updating. |
192
+ | `cancelText` | `Cancel` | Cancel button text. |
193
+ | `width` | `1100px` | Modal width. |
194
+ | `height` | `auto` | Modal height. |
195
+ | `closeOnBackdrop` | `true` | Whether clicking the backdrop closes the modal. |
196
+
197
+ ### Editor options
198
+
199
+ | Option | Default | Description |
200
+ | --- | --- | --- |
201
+ | `mode` | `kity` | Formula editor runtime mode. |
202
+ | `height` | `100%` | Embedded editor height. |
203
+ | `autofocus` | `true` | Whether the embedded editor should autofocus. |
204
+ | `assets` | `{}` | Optional Kity runtime asset overrides. |
205
+ | `render.fontsize` | `40` | Formula render font size. |
206
+
207
+ ## Exported API
208
+
209
+ | Export | Description |
210
+ | --- | --- |
211
+ | `registerFormulaXTinyMcePlugin` | Registers the TinyMCE plugin. |
212
+ | `resolveOptions` | Resolves user options into required defaults. |
213
+ | `openFormulaXOverlayModal` | Opens the FormulaX modal directly. |
214
+ | `createTinyMceFormulaMarkup` | Creates formula HTML from LaTeX. |
215
+ | `parseTinyMceFormulaMarkup` | Parses LaTeX into a FormulaX document. |
216
+ | `serializeTinyMceFormulaMarkup` | Serializes a FormulaX document into TinyMCE formula HTML. |
217
+ | `getFormulaLatexFromElement` | Reads source LaTeX from a formula element. |
218
+ | `findFormulaElement` | Finds the nearest FormulaX formula element. |
219
+ | `isFormulaElement` | Checks whether a node is a FormulaX formula element. |
220
+ | `replaceFormulaElement` | Replaces an existing formula element with updated markup. |
221
+ | `getTinyMceMajorVersion` | Reads the TinyMCE major version. |
222
+ | `createTinyMceCompat` | Creates the internal TinyMCE compatibility facade. |
223
+ | `warnUnsupportedTinyMceVersion` | Emits a warning for unsupported TinyMCE versions. |
224
+
225
+ ## Development
226
+
227
+ From the repository root:
228
+
229
+ ```bash
230
+ pnpm install
231
+ pnpm dev:tinymce
232
+ ```
233
+
234
+ Build only this package:
235
+
236
+ ```bash
237
+ pnpm --filter @formulaxjs/tinymce build
238
+ ```
239
+
240
+ Run package tests:
241
+
242
+ ```bash
243
+ pnpm --filter @formulaxjs/tinymce test
244
+ ```
245
+
246
+ Run package type checking:
247
+
248
+ ```bash
249
+ pnpm --filter @formulaxjs/tinymce typecheck
250
+ ```
251
+
252
+ ## Demo
253
+
254
+ Local demo:
255
+
256
+ ```bash
257
+ pnpm dev:tinymce
258
+ ```
259
+
260
+ GitHub Pages demo:
261
+
262
+ [https://vndmea.github.io/formulaX/tinymce/](https://vndmea.github.io/formulaX/tinymce/)
263
+
264
+ The demo includes a TinyMCE version selector and is intended to stay close to the standalone FormulaX playground experience.
265
+
266
+ ## Notes and limitations
267
+
268
+ - TinyMCE versions below 5 and 9 or newer are not officially supported.
269
+ - The API is still experimental.
270
+ - If your host TinyMCE configuration performs strict content filtering, ensure FormulaX formula spans and SVG output are allowed.
271
+ - The current editing UI uses the FormulaX Kity-compatible runtime.
272
+
273
+ ## License
274
+
275
+ FormulaX license information should be reviewed before public npm publishing.
276
+
277
+ KityFormula-related code and assets retain their original copyright and license notices.
@@ -0,0 +1,277 @@
1
+ # @formulaxjs/tinymce
2
+
3
+ [English](./README.md) | 简体中文
4
+
5
+ FormulaX 的 TinyMCE 集成适配器。
6
+
7
+ `@formulaxjs/tinymce` 会将 FormulaX 注册为 TinyMCE 插件,并提供基于弹窗的公式编辑体验,用于在 TinyMCE 内容中插入和更新公式。
8
+
9
+ > 状态:实验阶段。在首个稳定版本发布前,公共 API 仍可能调整。
10
+
11
+ ## 功能特性
12
+
13
+ - 通过 `registerFormulaXTinyMcePlugin` 注册 TinyMCE 插件
14
+ - 支持 FormulaX 工具栏按钮和菜单项
15
+ - 提供 `FormulaXOpen` TinyMCE 命令,便于代码中主动打开公式编辑器
16
+ - 将公式作为不可直接编辑的 inline 节点插入和更新
17
+ - 支持双击、Enter、Space 编辑已有公式
18
+ - 面向 TinyMCE `>=5 <9` 的兼容层
19
+ - 通过 `data-formulax-latex` 持久化 LaTeX 源内容
20
+ - 提供创建、解析、序列化、查找和替换公式元素的 markup 工具函数
21
+
22
+ ## 兼容性
23
+
24
+ 该包将 TinyMCE 声明为可选 peer dependency:
25
+
26
+ ```json
27
+ {
28
+ "tinymce": ">=5 <9"
29
+ }
30
+ ```
31
+
32
+ 适配器设计目标为 TinyMCE 5、6、7、8。对于不支持的主版本,会输出 console warning。
33
+
34
+ 工作空间中的 demo 可以通过 CDN 动态加载 TinyMCE 5、6、7、8,用于兼容性验证。
35
+
36
+ ## 安装
37
+
38
+ 包发布后可使用:
39
+
40
+ ```bash
41
+ pnpm add @formulaxjs/tinymce
42
+ pnpm add tinymce
43
+ ```
44
+
45
+ 在 FormulaX 工作空间内,直接使用 workspace 包:
46
+
47
+ ```bash
48
+ pnpm install
49
+ pnpm dev:tinymce
50
+ ```
51
+
52
+ ## 基础使用
53
+
54
+ 在调用 `tinymce.init` 之前注册 FormulaX TinyMCE 插件:
55
+
56
+ ```ts
57
+ import tinymce from 'tinymce';
58
+ import { registerFormulaXTinyMcePlugin } from '@formulaxjs/tinymce';
59
+
60
+ registerFormulaXTinyMcePlugin(tinymce, {
61
+ toolbarText: 'FormulaX',
62
+ tooltip: '插入或编辑公式',
63
+ modal: {
64
+ title: 'FormulaX 公式编辑器',
65
+ },
66
+ editor: {
67
+ mode: 'kity',
68
+ height: '100%',
69
+ autofocus: true,
70
+ render: { fontsize: 40 },
71
+ },
72
+ });
73
+
74
+ await tinymce.init({
75
+ selector: '#editor',
76
+ height: 420,
77
+ menubar: false,
78
+ plugins: 'formulax',
79
+ toolbar: 'undo redo | formulax',
80
+ license_key: 'gpl',
81
+ });
82
+ ```
83
+
84
+ 之后用户可以点击 `FormulaX` 工具栏按钮插入公式。已有公式可以通过双击编辑,也可以选中后按 Enter 或 Space 编辑。
85
+
86
+ ## 代码中主动打开
87
+
88
+ 插件会注册 `FormulaXOpen` 命令:
89
+
90
+ ```ts
91
+ editor.execCommand('FormulaXOpen');
92
+ ```
93
+
94
+ ## 自定义插件名称
95
+
96
+ 默认情况下,插件名、按钮名、菜单项名均为 `formulax`。
97
+
98
+ 如果自定义这些名称,需要确保 TinyMCE 的 `plugins` 和 `toolbar` 配置与自定义名称保持一致:
99
+
100
+ ```ts
101
+ registerFormulaXTinyMcePlugin(tinymce, {
102
+ pluginName: 'formulaXPlugin',
103
+ buttonName: 'formulaXButton',
104
+ menuItemName: 'formulaXMenuItem',
105
+ });
106
+
107
+ await tinymce.init({
108
+ selector: '#editor',
109
+ plugins: 'formulaXPlugin',
110
+ toolbar: 'formulaXButton',
111
+ });
112
+ ```
113
+
114
+ ## 公式 markup 工具函数
115
+
116
+ 当需要在插件 UI 之外生成或检查 FormulaX 公式节点时,可以使用 markup 工具函数:
117
+
118
+ ```ts
119
+ import {
120
+ createTinyMceFormulaMarkup,
121
+ getFormulaLatexFromElement,
122
+ isFormulaElement,
123
+ replaceFormulaElement,
124
+ } from '@formulaxjs/tinymce';
125
+
126
+ const html = createTinyMceFormulaMarkup('\\sqrt{x}');
127
+
128
+ const element = document.querySelector('[data-formulax="true"]');
129
+ if (isFormulaElement(element)) {
130
+ const latex = getFormulaLatexFromElement(element);
131
+ replaceFormulaElement(element, `${latex}+1`);
132
+ }
133
+ ```
134
+
135
+ 生成的公式节点会将 LaTeX 源内容保存在 `data-formulax-latex` 中,并通过 `data-formulax="true"` 标记:
136
+
137
+ ```html
138
+ <span
139
+ class="formulax-math"
140
+ data-formulax="true"
141
+ data-formulax-latex="\\sqrt{x}"
142
+ data-latex="\\sqrt{x}"
143
+ contenteditable="false"
144
+ data-mce-contenteditable="false"
145
+ style="cursor: pointer"
146
+ ></span>
147
+ ```
148
+
149
+ 具体生成的 HTML 结构属于内部实现,后续可能演进。业务侧应优先依赖导出的工具函数。
150
+
151
+ ## 配置项
152
+
153
+ ```ts
154
+ interface FormulaXTinyMceOptions {
155
+ pluginName?: string;
156
+ buttonName?: string;
157
+ menuItemName?: string;
158
+ toolbarText?: string;
159
+ tooltip?: string;
160
+ cursorStyle?: string;
161
+ formulaClassName?: string;
162
+ formulaAttributeName?: string;
163
+ renderMode?: 'text' | 'html';
164
+ initialLatex?: string;
165
+ modal?: FormulaXModalOptions;
166
+ editor?: FormulaXEditorOptions;
167
+ }
168
+ ```
169
+
170
+ | 配置项 | 默认值 | 说明 |
171
+ | --- | --- | --- |
172
+ | `pluginName` | `formulax` | 通过 `tinymce.PluginManager.add` 注册的 TinyMCE 插件名。 |
173
+ | `buttonName` | `formulax` | 工具栏按钮名。 |
174
+ | `menuItemName` | `formulax` | 菜单项名。 |
175
+ | `toolbarText` | `FormulaX` | 工具栏按钮和菜单项显示文本。 |
176
+ | `tooltip` | `Insert formula` | 工具栏按钮 tooltip。 |
177
+ | `cursorStyle` | `pointer` | 应用于生成公式节点的鼠标光标样式。 |
178
+ | `formulaClassName` | `formulax-math` | 生成的公式节点 CSS class。 |
179
+ | `formulaAttributeName` | `data-formulax-latex` | 用于保存 LaTeX 源内容的属性。 |
180
+ | `renderMode` | `text` | 实验性的渲染模式配置。 |
181
+ | `initialLatex` | 空字符串 | 插入新公式时的初始 LaTeX。 |
182
+ | `modal` | 见下方 | 弹窗标题、按钮文本、尺寸和关闭行为。 |
183
+ | `editor` | 见下方 | 内嵌 FormulaX 编辑器配置。 |
184
+
185
+ ### Modal 配置
186
+
187
+ | 配置项 | 默认值 | 说明 |
188
+ | --- | --- | --- |
189
+ | `title` | `FormulaX` | 弹窗标题。 |
190
+ | `insertText` | `Insert` | 插入公式时的提交按钮文本。 |
191
+ | `updateText` | `Update` | 更新公式时的提交按钮文本。 |
192
+ | `cancelText` | `Cancel` | 取消按钮文本。 |
193
+ | `width` | `1100px` | 弹窗宽度。 |
194
+ | `height` | `auto` | 弹窗高度。 |
195
+ | `closeOnBackdrop` | `true` | 点击遮罩层时是否关闭弹窗。 |
196
+
197
+ ### Editor 配置
198
+
199
+ | 配置项 | 默认值 | 说明 |
200
+ | --- | --- | --- |
201
+ | `mode` | `kity` | 公式编辑器运行时模式。 |
202
+ | `height` | `100%` | 内嵌编辑器高度。 |
203
+ | `autofocus` | `true` | 内嵌编辑器是否自动聚焦。 |
204
+ | `assets` | `{}` | 可选的 Kity runtime 资源覆盖配置。 |
205
+ | `render.fontsize` | `40` | 公式渲染字号。 |
206
+
207
+ ## 导出 API
208
+
209
+ | 导出 | 说明 |
210
+ | --- | --- |
211
+ | `registerFormulaXTinyMcePlugin` | 注册 TinyMCE 插件。 |
212
+ | `resolveOptions` | 将用户配置与默认配置合并为完整配置。 |
213
+ | `openFormulaXOverlayModal` | 直接打开 FormulaX 弹窗。 |
214
+ | `createTinyMceFormulaMarkup` | 根据 LaTeX 创建公式 HTML。 |
215
+ | `parseTinyMceFormulaMarkup` | 将 LaTeX 解析为 FormulaX 文档。 |
216
+ | `serializeTinyMceFormulaMarkup` | 将 FormulaX 文档序列化为 TinyMCE 公式 HTML。 |
217
+ | `getFormulaLatexFromElement` | 从公式元素读取 LaTeX 源内容。 |
218
+ | `findFormulaElement` | 查找最近的 FormulaX 公式元素。 |
219
+ | `isFormulaElement` | 判断节点是否为 FormulaX 公式元素。 |
220
+ | `replaceFormulaElement` | 使用更新后的 markup 替换已有公式元素。 |
221
+ | `getTinyMceMajorVersion` | 读取 TinyMCE 主版本号。 |
222
+ | `createTinyMceCompat` | 创建内部 TinyMCE 兼容门面。 |
223
+ | `warnUnsupportedTinyMceVersion` | 对不支持的 TinyMCE 版本输出警告。 |
224
+
225
+ ## 开发
226
+
227
+ 在仓库根目录执行:
228
+
229
+ ```bash
230
+ pnpm install
231
+ pnpm dev:tinymce
232
+ ```
233
+
234
+ 仅构建该包:
235
+
236
+ ```bash
237
+ pnpm --filter @formulaxjs/tinymce build
238
+ ```
239
+
240
+ 运行该包测试:
241
+
242
+ ```bash
243
+ pnpm --filter @formulaxjs/tinymce test
244
+ ```
245
+
246
+ 运行该包类型检查:
247
+
248
+ ```bash
249
+ pnpm --filter @formulaxjs/tinymce typecheck
250
+ ```
251
+
252
+ ## Demo
253
+
254
+ 本地 demo:
255
+
256
+ ```bash
257
+ pnpm dev:tinymce
258
+ ```
259
+
260
+ GitHub Pages demo:
261
+
262
+ [https://vndmea.github.io/formulaX/tinymce/](https://vndmea.github.io/formulaX/tinymce/)
263
+
264
+ 该 demo 包含 TinyMCE 版本选择器,并目标上尽量与独立 FormulaX playground 的体验保持一致。
265
+
266
+ ## 注意事项与限制
267
+
268
+ - TinyMCE 5 以下以及 9 或更高版本目前不是官方支持范围。
269
+ - 当前 API 仍处于实验阶段。
270
+ - 如果宿主 TinyMCE 配置了严格的内容过滤,需要确保允许 FormulaX 公式 span 和 SVG 输出。
271
+ - 当前编辑 UI 使用 FormulaX 的 Kity 兼容运行时。
272
+
273
+ ## 协议
274
+
275
+ FormulaX 的许可信息应在公开 npm 发布前完成审查。
276
+
277
+ KityFormula 相关代码和资源保留其原始版权和许可声明。