ckeditor5
ckeditor5 copied to clipboard
Impossible to build CKEditor without UI
📝 Provide detailed reproduction steps (if any)
I'm trying to use CKEditor as a framework, and not the UI kit. I'm really struggling in ditching the Widget/UI modules.
- Anything that depends on clipboard (e.g. linkediting) pulls in clipboard, which pulls widget which pulls UI
- Because i want to avoid loading UI parts of the commands/plugins, I need to use files directly. There're issues with importing classes in typescript. E.g. importing from engine/src/editor/editor doesnt allow to instantiate the Editor.
here's an example of workaround i have to do to import a class not fron entry point of a package
import { default as OriginalRenderer } from '@ckeditor/ckeditor5-engine/src/view/renderer.js'
import type { Renderer as OriginaRendererConstructor } from '@ckeditor/ckeditor5-engine'
export const Renderer = OriginalRenderer as unknown as typeof OriginaRendererConstructor
- CSS/Icons is loaded in many places unconditionally
- Modules internally pull from each other's entry point, making them load eveyrthing. Example:
import {
DomEventData,
Observer,
type View,
type ViewDocumentCompositionEndEvent,
type ViewDocumentInputEvent,
type ViewDocumentSelection,
type ViewRange,
type ViewSelection
} from '@ckeditor/ckeditor5-engine';
in ckeditor5-typing, forces loading of css/icons 5. Some modules are importuing ui casually in utils files: https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-list/src/list/utils.ts
✔️ Expected result
It should be possible to have basic functionality
❌ Actual result
One way or another we're back to build that includes UI, css, svg icons, Widget, etc.
❓ Possible solution
Clear up some unnecessary dependencies
Hey @Inviz! This is a very interesting use case, and it got us thinking internally! Would you be willing to jump on a call with me and couple of devs? I can follow up to your email from the profile.
@Witoso
Definitely i'd love to jump on a call, i think my email aliases to [email protected] - you can reach me there. Let's do it today soon?
Here're some examples of what i've been doing with ckeditor. Container-level "cursor", real inline elements inside text elements, themes, css grid editor, multi-row flexbox drag and drop, data mapping/repeating, linked duplicate, external css customization, custom elements, web components, responsive designs, to name a few.
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.