23 Feb 2021 15:23:58 Bruce Wilkie posted:
I have insert and update pages set up and working fine apart from an issue with inserting images, which is as follows:
Starting with the insert page:
If I add an image in the medium editor box then it appears ok in the box and i can change the alignment and the caption without any problems. But then, if I submit the form to insert into my database table, all the text in the medium editor bos is added to the table, but the image data (eg isn't included with the text.
But if I insert an image as above, and then edit the text elsewhere in the medium editor box, then when I submit to insert into my database table, the image script is added along with the other text.
So for example, if I add some text and then an image and submit the form, only the text is inserted. But if i add some text and then an image and then some more text, then the text and the image are added.
Similarly with the update page, if I edit the text in the medium editor box and then change the alignment of the image, or even add a new image. Then when i submit to update, the changes to the text are updated, but the changes to the image are not updated. But if I edit some text after making changes to the image, or adding a new image, then those changes are updated when I submit the form.
How do i fix it so that when I insert an image I don't then need to edit the text in the box before I submit the form?
Thanks in advance