@one2x/medeo-rte 0.3.0 → 0.4.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/README.md CHANGED
@@ -202,6 +202,16 @@ editor.commands.insertHostEmbed('Upscale', { label: '@Upscale' }, { width: 88, h
202
202
 
203
203
  脚本化改文档也可 `import { operations, runOperation } from '@one2x/medeo-rte'`,不要直接改 `DocumentModel` 的内部表。
204
204
 
205
+ ## 性能面板
206
+
207
+ 常驻在页面左下角,每次输入上屏后显示这一次的**上屏延迟**(按键 → 下一帧画完)、**编辑器耗时**(编辑器自身同步 JS)和**排队时间**(事件等主线程的时间),每项后面的圆点按阈值显示绿 / 黄 / 红。3 秒没有输入显示 `—`。不存历史,关闭时零开销。
208
+
209
+ ```ts
210
+ new Editor(el, { perfPanel: true }); // 或运行时 editor.setPerfPanel(true / false)
211
+ ```
212
+
213
+ 上屏延迟高而编辑器耗时低,说明慢的不是编辑器(机器、其他页面逻辑或渲染)。demo 默认开启。
214
+
205
215
  ## 性能探针(开发用)
206
216
 
207
217
  默认关闭、零开销。在浏览器控制台里: