Skip to content

Check compatibility with upcoming CKE5 v 45 in core #48

@indigoxela

Description

@indigoxela

See the core issue: backdrop/backdrop-issues#6904

I can only see one problematic line:

const dropdownView = CKEditor5.ui.createDropdown(locale);

The rest might be just fine. Didn't test anything, just looked at the code.

Suggestion (roughly and untested):

let dropdownView;
if (typeof CKEditor5.ui.createDropdown === 'function') {
  dropdownView = CKEditor5.ui.createDropdown(locale);
}
else {
  dropdownView = CKEditor5.createDropdown(locale);
}

To explain: By checking the current location, you're compatible with CKE5 v44 and CKE5 v45.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions