preview-587cd39a5889a.js:2 ERROR TypeError: Cannot read properties of undefined (reading 'create')
at eval (link.ts:35:6)
at Fragment.forEach (index.cjs:344:21)
at linkify (link.ts:17:9)
at eval (link.ts:44:21)
at Fragment.forEach (index.cjs:344:21)
at linkify (link.ts:17:9)
at Plugin.transformPasted (stringUtil.ts:1:53)
at eval (index.cjs:3105:17)
at EditorView.someProp (index.cjs:5684:60)
at parseFromClipboard (index.cjs:3104:10)
What happened?
Create Editor using custom schema with disabled hyperlinks. That is, Editor should disallow creating
<a>
elements.Copy-paste an arbitrary HTML-formatted content including a hyperlink. For example, this area:
Expected: The hyperlink part becomes plain text. No errors raised.
Actual The hyperlink part indeed becomes plain text, but JS error appears in the console.
Version
v17.5.4
Angular Version
v17.3.12
What browsers are you seeing the problem on?
Chrome
Link to reproduce
https://stackblitz.com/edit/ngx-editor-ekfbzm?file=src%2Fapp%2Fapp.component.ts
Relevant log output
Willing to submit a PR?
None