最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

angular - Ngx-Editor + CodeMirror: "Invalid change range" error when typing after completely clearing its cont

programmeradmin2浏览0评论

I'm using ngx-editor with prosemirror-codemirror-6 in an Angular project to add a code_mirror node. The editor works fine, but when I press Typing continuously inside a code_mirror block, I get the following error:

hook.js:608  ERROR RangeError: Invalid change range 6 to 6 (in doc of length 0)
    at process (index.js:962:57)
    at _ChangeSet.of (index.js:973:5)
    at _EditorState.changes (index.js:2596:22)
    at applyDefaultInsert (index.js:3961:30)
    at defaultInsert (index.js:3948:55)
    at applyDOMChangeInner (index.js:3949:118)
    at EditContextManager.handlers.textupdate (index.js:7173:9)
    at _ZoneDelegate.invokeTask (zone.js:402:33)
    at core.mjs:6193:49
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:6193:30)

Followed this StackBliz

Note:- Installed package details

  • Angular version is 19.1.0
  • @codemirror/lang-javascript version is 6.2.3
  • codemirror version is 6.0.1
  • prosemirror-codemirror-6 version is 1.0.1

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论