-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement caption and meta-information for images #119 #344
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I might be misunderstanding how all of this fits together, so I asked some questions inline. Maybe we should look at this together this afternoon.
system/wymeditor/plugins/image_upload/jquery.wymeditor.image_upload.js
Outdated
Show resolved
Hide resolved
system/wymeditor/plugins/image_upload/jquery.wymeditor.image_upload.js
Outdated
Show resolved
Hide resolved
2301a1e
to
45ac45e
Compare
7d206a8
to
a26df84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a bunch of inline comments which I also fixed in two fixup commits that I'll push in a minute.
I did find some other problems that are still unfixed right now and might need us to rethink our approach. In particular:
- The
<figure>
tag is a block-level tag, while<img>
is inline, so adding thefigure
creates invalid HTML, causing at least my Firefox to drop the<figure>
, it seems. - Any layout CSS applied to the image might break. In particular, the default theme supports e.g. the
.left
class to make the image floating and have text wrap around it, but this breaks when wrapped inside<figure>
. - Inside the wymeditor, the caption is not shown, which makes it a bit harder to preview changes.
Not sure if there is an easy fix for these, so maybe we should be storing <figure>
tags after all?
One additional thing I found is that you now explicitly exclude any HTML inside wymeditor, which I had expected to be not needed since this should live as text (rather than HTML) inside a textarea. However, I found that we actually changed this to HTML in b6f630e to actually allow the global dewikify to process this. However, this results in actual (non-escaped) HTML to end up in the Also note that this editor starts out as an I think it might be better to just revert to storing text rather than HTML, but manually run I also wonder if we really need this |
Wraps images with title or data-attribution attribute in a figure element. Places the title in a figcaption element. Places the data-attribution in a small element.
3b9c93a
to
55cfe02
Compare
Fixes #119