Replies: 1 comment
-
|
I took a bit more of a dumbed-down approach to this. Rather than make it possible to float a This doesn't (currently) allow for anything to wrap around the image other than plain text, and the text that wraps around the image is a part of the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Spent a little bit of time today investigating what this might take.
If we remove
white-space: pre-wrapandwidth: 100%from.component[data-obo-component='true']then we can applyfloat: leftto*[data-type='ObojoboDraft.Chunks.Figure']and it will wrap in the viewer. We can ensure certain chunks don't wrap with (an example:)css
The editor is more problematic. The insert menu
(+)::::(+)isn't rendering as expected because the height calculation of the floated chunk is not what it expects. It also causes the cursor to jump into any wrapping text, so each floatable chunk would need to have a dummy text node to trap input.We also need a solution for no longer having
pre-wrap, as text like\t[ ]would be rendered as[ ]instead of[ ].Last, we need a convention for our internal attribute for wrapping. I could see us wrapping other items, like tables, so maybe a new
wrapattribute withnone(default),leftorright. OR, probably a better idea, utilize the align property and letwrapbe a boolean. Downside to that is allowing users to left-align an image and not-wrap it, which could be weird.Last last, need to wipe out any floating styles at mobile sizes.
Beta Was this translation helpful? Give feedback.
All reactions