Found three issues with the WYSIWYG image editing in the Elemental content block on SilverStripe 4.6
I tried to revert the cwp/cwp-recipe-core to 2.5.2@stable, and the issues do not happen.
Lost customized image sizes after clicking the Edit button in WYSIWYG
Lost customized caption after editing clicking the Edit button in WYSIWYG
When the image with Caption and the "Right Wrap" position, the edit image button does not show up when clicking on the image.
Steps to replicate
1. Lost customized image sizes after clicking the Edit button in WYSIWYG
Steps to replicate:
Add an Elemental content block
Click the "Insert from files" button from the WYSIWYG toolbar
Choose one image, and fill the width with "300"
Click "Update file", then the image shows in the WYSIWYG editor
Click the same image, and click the "Edit image" button
The image width is empty
2. Lost customized caption after editing clicking the Edit button in WYSIWYG
Steps to replicate:
Click the image in the WYSIWYG, and click the "Edit image" button
Fill the Caption with some text
Click "Update file"
Caption show under the image
Click the "Edit image" button
The "Caption" field is empty, and clicking the "Update file" will lose the previous Caption text.
3. When the image with "Right Wrap" position, the edit image button does not show up when clicking on the image.
Click the image in the WYSIWYG, and click the "Edit image" button
Set the Position to "Right Wrap"
Fill the Caption filed with some text
Click "Update file"
Click the same image, and the "Edit image" button does not show.
Affected Version
cwp/cwp-recipe-core : 2.6.1 Silverstripe CMS: 4.6.2 dnadesign/silverstripe-elemental: 4.4.1
Description
Found three issues with the WYSIWYG image editing in the Elemental content block on SilverStripe 4.6 I tried to revert the cwp/cwp-recipe-core to 2.5.2@stable, and the issues do not happen.
Steps to replicate
1. Lost customized image sizes after clicking the Edit button in WYSIWYG Steps to replicate:
Add an Elemental content block
Click the "Insert from files" button from the WYSIWYG toolbar
Choose one image, and fill the width with "300"
Click "Update file", then the image shows in the WYSIWYG editor
Click the same image, and click the "Edit image" button
The image width is empty
2. Lost customized caption after editing clicking the Edit button in WYSIWYG Steps to replicate:
Click the image in the WYSIWYG, and click the "Edit image" button
Fill the Caption with some text
Click "Update file"
Caption show under the image
Click the "Edit image" button
The "Caption" field is empty, and clicking the "Update file" will lose the previous Caption text.
3. When the image with "Right Wrap" position, the edit image button does not show up when clicking on the image.
Click the image in the WYSIWYG, and click the "Edit image" button
Set the Position to "Right Wrap"
Fill the Caption filed with some text
Click "Update file"
Click the same image, and the "Edit image" button does not show.