Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the CKEditor5 global object based off the CKEditor5 DLLs #8521

Closed
jodator opened this issue Nov 24, 2020 · 3 comments
Closed

Implement the CKEditor5 global object based off the CKEditor5 DLLs #8521

jodator opened this issue Nov 24, 2020 · 3 comments
Assignees
Labels
type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@jodator
Copy link
Contributor

jodator commented Nov 24, 2020

馃摑 Provide a description of the new feature

It would be nice to have all (DLLs and plugins) exposed as UMD global (or just global).

  • Every package has its index.js (probably also defined in package.json if needed - other plugins might use it to import it).
  • Webpack plugin to extends index.js so the exports are exposed as window.CKEditor5[ packageName ].
    • Additionally, we should move other globals (version, translations) there. (馃帀 breaking change).
    • We can also do runtime checks for:
      • versions
      • required DLLs (core, widget, ui, etc) based on dependencies listed in package.jsons of these packages
    • In the end, we have:
      • window.CKEditor5.htmlEmbed.HtmlEmbed
      • window.CKEditor5.htmlEmbed.HtmlEmbedCommand
      • window.CKEditor5.htmlEmbed.HtmlEmbedUI
      • window.CKEditor5.htmlEmbed.HtmlEmbedEditing

To check: CKEditor5 or CKE5? Definitely not CKEDITOR to avoid conflicts with CKEditor 4's global.

If changes in other packages (version, translations) might be done separately then it would be even better. I think that we might forget about something. Additionally, other improvements might also be done in a follow-up.


If you'd like to see this feature implemented, add a 馃憤 reaction to this post.

@jodator jodator added the type:feature This issue reports a feature request (an idea for a new functionality or a missing option). label Nov 24, 2020
@jodator jodator added this to the iteration 39 milestone Nov 24, 2020
@pomek
Copy link
Member

pomek commented Nov 26, 2020

I guess the screen attached below says more than anything else:

image

This was referenced Dec 3, 2020
@jodator
Copy link
Contributor Author

jodator commented Dec 10, 2020

The plugins are automatically available on CKEditor5 global object. However, we miss the plugins bundled in DLL. For instance Plugin from core in main ckeditor5 repo:

/**
 *  @module dll/core
 */

import { Plugin } from '@ckeditor/ckeditor5-core/core';

export * from '@ckeditor/ckeditor5-core/core';

window.CKEditor5.core = {};

window.CKEditor5.core.plugin = Plugin;

@jodator jodator closed this as completed Dec 10, 2020
@jodator jodator reopened this Dec 10, 2020
jodator added a commit that referenced this issue Dec 10, 2020
Internal: DLL modules will be added to the global scope. Closes #8521.
@jodator
Copy link
Contributor Author

jodator commented Dec 10, 2020

Closed with a51150.

@jodator jodator closed this as completed Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

2 participants