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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-2961: Fixed extensibility point for adding plugins in CKEditor #46

Merged
merged 4 commits into from
Jun 22, 2022

Conversation

dew326
Copy link
Contributor

@dew326 dew326 commented Jun 10, 2022

Question Answer
JIRA issue IBX-2961
Requires ibexa/core#120
Type bug
Target Ibexa version v4.1+
BC breaks no
Tests

Related changes:

Doc

See also ibexa/admin-ui#471 for Doc.

We need to extend this part of the documentation: https://doc.ibexa.co/en/latest/extending/extending_online_editor/#add-ckeditor-plugins

It is still needed to add plugin into the extraPlugins array, but it has to be done in a specific way.
The JS cannot be added by the default configManager or added in any encore entry. It has to be added to the ibexa-richtext-onlineeditor-js entry.

So we introduced the new configManager which will handle adding JS to the CKEditor config.
The file that must be created is ibexa.richtext.config.manager.js either in the top level project folder encore or in a Resources/encore/ folder in the bundle

the code for ibexa.richtext.config.manager.js:

const path = require('path');

module.exports = (ibexaConfig, ibexaConfigManager) => {
    ibexaConfigManager.add({
        ibexaConfig,
        entryName: 'ibexa-richtext-onlineeditor-js',
        newItems: ["path_to_file"],
    });
};

TODO:

  • Ask for Code Review.

@alongosz alongosz force-pushed the ckeditor-add-plugin branch 2 times, most recently from 8141006 to e78e8f3 Compare June 14, 2022 11:52
@alongosz alongosz changed the title [WIP] IBX-2961: Fixed extensibility point for adding plugins in CKEditor IBX-2961: Fixed extensibility point for adding plugins in CKEditor Jun 14, 2022
@alongosz alongosz requested review from Nattfarinn, alongosz, adamwojs and a team June 14, 2022 12:50
@alongosz alongosz requested a review from adamwojs June 20, 2022 12:58
@alongosz alongosz merged commit 2fb6495 into 4.1 Jun 22, 2022
@alongosz alongosz deleted the ckeditor-add-plugin branch June 22, 2022 08:09
@DominikaK DominikaK removed the Doc needed The changes require some documentation label Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants