Loading core/modules/ckeditor5/js/build/drupalImage.js +1 −1 File changed.Preview size limit exceeded, changes collapsed. Show changes core/modules/ckeditor5/js/ckeditor5_plugins/drupalImage/src/imageupload/drupalimageuploadadapter.js +3 −7 Original line number Diff line number Diff line Loading @@ -5,11 +5,6 @@ * Upload adapter. * * Copied from @ckeditor5/ckeditor5-upload/src/adapters/simpleuploadadapter * Adds a mapping from `response.uuid` to `dataEntityUuid` and * `response.entity_type` to `dataEntityType` for the callback after the file * upload in the `_initListeners` method. * * @todo use response.entity_type directly instead of converting it https://www.drupal.org/project/drupal/issues/3275237 * * @private * @implements module:upload/filerepository~UploadAdapter Loading Loading @@ -110,10 +105,11 @@ export default class DrupalImageUploadAdapter { : genericErrorText, ); } // Resolve with the `urls` property and pass the response // to allow customizing the behavior of features relying on the upload adapters. resolve({ response, urls: { default: response.url }, dataEntityUuid: response.uuid ? response.uuid : '', dataEntityType: response.entity_type ? response.entity_type : '', }); }); Loading core/modules/ckeditor5/js/ckeditor5_plugins/drupalImage/src/imageupload/drupalimageuploadediting.js +2 −6 Original line number Diff line number Diff line Loading @@ -15,14 +15,10 @@ export default class DrupalImageUploadEditing extends Plugin { const imageUploadEditing = editor.plugins.get('ImageUploadEditing'); imageUploadEditing.on('uploadComplete', (evt, { data, imageElement }) => { editor.model.change((writer) => { writer.setAttribute( 'dataEntityUuid', data.dataEntityUuid, imageElement, ); writer.setAttribute('dataEntityUuid', data.response.uuid, imageElement); writer.setAttribute( 'dataEntityType', data.dataEntityType, data.response.entity_type, imageElement, ); }); Loading Loading
core/modules/ckeditor5/js/build/drupalImage.js +1 −1 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/modules/ckeditor5/js/ckeditor5_plugins/drupalImage/src/imageupload/drupalimageuploadadapter.js +3 −7 Original line number Diff line number Diff line Loading @@ -5,11 +5,6 @@ * Upload adapter. * * Copied from @ckeditor5/ckeditor5-upload/src/adapters/simpleuploadadapter * Adds a mapping from `response.uuid` to `dataEntityUuid` and * `response.entity_type` to `dataEntityType` for the callback after the file * upload in the `_initListeners` method. * * @todo use response.entity_type directly instead of converting it https://www.drupal.org/project/drupal/issues/3275237 * * @private * @implements module:upload/filerepository~UploadAdapter Loading Loading @@ -110,10 +105,11 @@ export default class DrupalImageUploadAdapter { : genericErrorText, ); } // Resolve with the `urls` property and pass the response // to allow customizing the behavior of features relying on the upload adapters. resolve({ response, urls: { default: response.url }, dataEntityUuid: response.uuid ? response.uuid : '', dataEntityType: response.entity_type ? response.entity_type : '', }); }); Loading
core/modules/ckeditor5/js/ckeditor5_plugins/drupalImage/src/imageupload/drupalimageuploadediting.js +2 −6 Original line number Diff line number Diff line Loading @@ -15,14 +15,10 @@ export default class DrupalImageUploadEditing extends Plugin { const imageUploadEditing = editor.plugins.get('ImageUploadEditing'); imageUploadEditing.on('uploadComplete', (evt, { data, imageElement }) => { editor.model.change((writer) => { writer.setAttribute( 'dataEntityUuid', data.dataEntityUuid, imageElement, ); writer.setAttribute('dataEntityUuid', data.response.uuid, imageElement); writer.setAttribute( 'dataEntityType', data.dataEntityType, data.response.entity_type, imageElement, ); }); Loading