uploadcare / uploadcare-redactor

Redactor Uploadcare plugin
MIT License
18 stars 9 forks source link

Wrap images in imageTag after upload #9

Closed aaweb closed 8 years ago

aaweb commented 8 years ago

Hey there

Looking at the latest example at https://imperavi.com/redactor, it seems like images should be wrapped inside a <figure> tag (or whatever imageTag is set to) after insert, to be consistent with the default redactor behavior.

See: https://imperavi.com/redactor/docs/settings/images/#setting-imageTag

This specifically plays a role when a caption is present, as redactor otherwise doesn't recognize it as a caption for that image.

Repro would be:

  1. Insert image via uploadcare
  2. Click the image to open the modal and add a Caption, Save.
  3. Click the image again, the caption field is empty.