-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Image galleries #523
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
Merged
Merged
Image galleries #523
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Extract new Document and Text methods from Composition logic
@bergatron: > I think we should kill the `role="group"` on that div, since it doesn't have a heading. > > We could use the `role="region"` along with an `aria-label="uploaded images"` (or something similar), but otherwise without a label, we should just go with a plain old `<div>`.
|
Amazing! I look forward to the acceptance of this pull request. 👏🏻 |
d311608 to
f413cf9
Compare
Improves cursor movement through image galleries in Edge 17
9682b37 to
7028994
Compare
Fixes caption editing in Safari and restores the normal selection to caption input elements in all browsers.
This was referenced Sep 17, 2018
|
Seems like the styles are not included by default? Had to add manually to https://www.npmjs.com/package/trix |
Contributor
Author
|
@randohinn, see Styling Formatted Content:
|
|
Will image linking functionality be restored in some future? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support for displaying groups of images in a grid, AKA image galleries. It works by automatically grouping adjacent image attachments into blocks, and styling the block's attachment elements to form a grid. The layout is 100% CSS-based so it can easily be customized or adjusted for different viewport sizes using media queries. Out of the box, Trix supports two and three column grids controlled by just a few styles in
trix.css:trix/assets/trix/stylesheets/content.scss
Lines 96 to 116 in 23ea7a0
→
→
Additional changes
Attachment toolbars now include file metadata, and their markup and has been revised to align more closely with

<trix-toolbar>'s.Text formatting can no longer be applied to attachments because, in part, the resulting HTML would break image gallery layouts. It also had weird/inconsistent results before and could easily happen accidentally (dropping images into bold text, for example).

Attachments with
hrefattributes now render<a>s inside their<figure>s.