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.36k stars 3.68k forks source link

Incorrect import in clipboard guide #16181

Open FilipTokarski opened 5 months ago

FilipTokarski commented 5 months ago

📝 Provide a description of requested docs changes

Follow this guide - https://ckeditor.com/docs/ckeditor5/latest/framework/deep-dive/clipboard.html#paste-as-plain-text-plugin-example. When importing:

import { plainTextToHtml } from '@ckeditor/ckeditor5-clipboard';

It results with error:

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/@ckeditor_ckeditor5-clipboard.js?v=920e8a4d' does not provide an export named 'plainTextToHtml'

Or a warning:

export 'plainTextToHtml' (imported as 'plainTextToHtml') was not found in '@ckeditor/ckeditor5-clipboard' (possible exports: Clipboard, ClipboardMarkersUtils, ClipboardPipeline, DragDrop, DragDropBlockToolbar, DragDropTarget, PastePlainText)
Afrin127329 commented 5 months ago

I've got the same error while adding it in my react code

This file is actually inside the utils folder: ckeditor\packages\ckeditor5-clipboard\src\utils\plaintexttohtml.ts and it's imported in this clipboardpipeline file ckeditor\packages\ckeditor5-clipboard\src\clipboardpipeline.ts, not directly imported on the index file inside src. that's the reason of causing this issue.

ck1