ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.33k stars 3.68k forks source link

DecoupledEditor create error #16476

Open wangcheng0825 opened 3 months ago

wangcheng0825 commented 3 months ago

πŸ“ Provide detailed reproduction steps (if any)

  1. import "@ckeditor/ckeditor5-build-decoupled-document";
  2. call DecoupledEditor.create(..., config)
image

βœ”οΈ Expected result

editor create success

❌ Actual result

TypeError: this.editors.add is not a function at dr._addEditor (context.ts:248:1) at bP.sg [as constructor] (editor.ts:292:1) at bP._class5 [as constructor] (elementapimixin.ts:61:1) at bP.Vw [as constructor] (decouplededitor.ts:88:1) at new bP (ckeditor.ts:31:1) at decouplededitor.ts:266:1 at new Promise () at Function.create (decouplededitor.ts:259:1) at e._render_ckeditor (ckeditor5.js:48:1) at e._require_ckeditor (ckeditor5.js:26:1)

❓ Possible solution

I try to import Collection from "@ckeditor/ckeditor5-utils" and new a Collection, like this:

let editors = new Collection(); console.log(editors.add);

but still print the editors.add is not a function.

πŸ“ƒ Other details


TatsuUkraine commented 2 months ago

any update on this?