Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dependencies": {},
"devDependencies": {
"@ibexa/eslint-config": "https://github.com/ibexa/eslint-config-ibexa.git#~v2.0.0",
"@ibexa/frontend-config": "https://github.com/ibexa/frontend-config#^v5.0.0-beta1",
Copy link

Copilot AI Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git URL fragment #^v5.0.0-beta1 mixes a caret with a git ref, which may not be supported by all package managers. Consider using a branch name (e.g. #v5.0.0-beta1) or a semver tag.

Suggested change
"@ibexa/frontend-config": "https://github.com/ibexa/frontend-config#^v5.0.0-beta1",
"@ibexa/frontend-config": "https://github.com/ibexa/frontend-config#v5.0.0-beta1",

Copilot uses AI. Check for mistakes.
"@ibexa/ts-config": "https://github.com/ibexa/ts-config-ibexa#~v1.1.0",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2"
Expand Down
57 changes: 33 additions & 24 deletions src/bundle/Resources/encore/ibexa.webpack.custom.config.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
const Encore = require('@symfony/webpack-encore');
const path = require('path');
const ibexaConfigManager = require(path.resolve('./ibexa.webpack.config.manager.js'));

const ibexaConfigManager = require('@ibexa/frontend-config/webpack-config/manager');

const configManagers = require(path.resolve('./var/encore/ibexa.richtext.config.manager.js'));

Encore.reset();
Encore.setOutputPath('public/assets/richtext/build').setPublicPath('/assets/richtext/build').enableSassLoader().disableSingleRuntimeChunk();
const getCustomConfig = (Encore) => {
Encore.reset();
Encore.setOutputPath('public/assets/richtext/build')
.setPublicPath('/assets/richtext/build')
.enableSassLoader()
.disableSingleRuntimeChunk();

Encore.addEntry('ibexa-richtext-onlineeditor-js', [path.resolve(__dirname, '../public/js/CKEditor/core/base-ckeditor.js')]).addStyleEntry(
'ibexa-richtext-onlineeditor-css',
[
Encore.addEntry('ibexa-richtext-onlineeditor-js', [
path.resolve(__dirname, '../public/js/CKEditor/core/base-ckeditor.js'),
]).addStyleEntry('ibexa-richtext-onlineeditor-css', [
path.resolve('./public/bundles/ibexaadminuiassets/vendors/ckeditor5/dist/ckeditor5.css'),
path.resolve(__dirname, '../public/scss/ckeditor.scss'),
],
);
]);

Encore.addAliases({
'@ckeditor': path.resolve('./public/bundles/ibexaadminuiassets/vendors/@ckeditor'),
ckeditor5: path.resolve('./public/bundles/ibexaadminuiassets/vendors/ckeditor5'),
'@fieldtype-richtext': path.resolve('./vendor/ibexa/fieldtype-richtext'),
'@ibexa-admin-ui': path.resolve('./vendor/ibexa/admin-ui'),
});

const customConfig = Encore.getWebpackConfig();

Encore.addAliases({
'@ckeditor': path.resolve('./public/bundles/ibexaadminuiassets/vendors/@ckeditor'),
ckeditor5: path.resolve('./public/bundles/ibexaadminuiassets/vendors/ckeditor5'),
'@fieldtype-richtext': path.resolve('./vendor/ibexa/fieldtype-richtext'),
'@ibexa-admin-ui': path.resolve('./vendor/ibexa/admin-ui'),
});
customConfig.name = 'richtext';

const customConfig = Encore.getWebpackConfig();
customConfig.module.rules[4].oneOf[1].use[1].options.url = false;
customConfig.module.rules[1].oneOf[1].use[1].options.url = false;

customConfig.name = 'richtext';
configManagers.forEach((configManagerPath) => {
const configManager = require(path.resolve(configManagerPath));

customConfig.module.rules[4].oneOf[1].use[1].options.url = false;
customConfig.module.rules[1].oneOf[1].use[1].options.url = false;
configManager(customConfig, ibexaConfigManager);
});

configManagers.forEach((configManagerPath) => {
const configManager = require(path.resolve(configManagerPath));
Encore.reset();
Copy link

Copilot AI Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second Encore.reset() right before returning customConfig will clear all previously chained settings, leading to an empty or default config. Remove this reset or relocate it.

Suggested change
Encore.reset();

Copilot uses AI. Check for mistakes.

configManager(customConfig, ibexaConfigManager);
});
return customConfig;
};

module.exports = customConfig;
module.exports = getCustomConfig;
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class IbexaEmbedImageEditing extends Plugin {
const domElement = this.toDomElement(domDocument);

// note: do not reformat - configuration value for image embeds cannot contain whitespaces
// eslint-disable-next-line

domElement.innerHTML = `<span data-ezelement="ezvalue" data-ezvalue-key="size">${modelElement.getAttribute('size')}</span>`; // prettier-ignore

return domElement;
Expand Down
Loading