Skip to content

feat: float image - #1132

Closed
fuscodev wants to merge 2 commits into
docmost:mainfrom
fuscodev:float-image
Closed

fuscodev wants to merge 2 commits into
docmost:mainfrom
fuscodev:float-image

Conversation

@fuscodev

@fuscodev fuscodev commented May 2, 2025

Copy link
Copy Markdown
Contributor

@AndrewSav

Copy link
Copy Markdown

FWIW, in the 5 minutes I've spent testing this, I have not encountered any issues.

@AndrewSav

Copy link
Copy Markdown

@Philipinho what needs to happen for this to be merged?

@aedelor

aedelor commented Sep 13, 2025

Copy link
Copy Markdown

I'm dying for this to make it into an update. 😭

@AndrewSav

Copy link
Copy Markdown

Well we all are. It does not seems that the repo owner is interested in engaging here, though. It's been 4 months since the PR was created, and I asked a question about it above which remained ignored. At this stage, I think it would be wise temper our hopes. For what it's worth, there is also this: https://github.com/Vito0912/forkmost

@andresbott

Copy link
Copy Markdown

NICE!!! i want this

@darkshenzi

Copy link
Copy Markdown

When will this feature be available? @Philipinho

@Bettelmage

Copy link
Copy Markdown

Please, please, please add this feature!

vvzvlad pushed a commit to vvzvlad/gitmost that referenced this pull request Jun 24, 2026
…most)

Adds floatLeft / floatRight image alignment so text wraps beside the image,
beyond the existing block left/center/right. Ported from Forkmost PR #7 /
upstream Docmost PR docmost#1132 (fuscodev), adapted to gitmost's imperative image
node-view (the upstream uses a React styled component; ours styles the node-view
container directly via applyAlignment).

- editor-ext image.ts: `setImageAlign` accepts `floatLeft`/`floatRight`;
  `applyAlignment` resets float/padding then, for a float mode, sets
  `float:left|right` + side padding on the (shrink-to-fit) container so text
  flows beside it (the inner <img> already has max-width:100%). The resolved
  align is mirrored onto the container as `data-image-align` for the responsive
  rule. `data-align` already round-trips the value through parse/renderHTML, so
  float survives serialization / collab / history with no schema change.
- image-menu.tsx: Float-left / Float-right bubble-menu buttons (IconFloatLeft/
  Right) with active state.
- image-resize.module.css: on narrow screens (<=600px) a floated image collapses
  to full width and drops the float (`!important`, keyed on data-image-align) —
  the upstream "100% width on small screen" follow-up.
- i18n: en-US + ru-RU strings.

editor-ext build + client tsc --noEmit clean. Visual wrap behavior is best
confirmed in-browser (logic/serialization verified by build + types).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@Philipinho Philipinho closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Word wrap around images

7 participants