Skip to content

feat: add support for codeblock on iOS - #253

Merged
kacperzolkiewski merged 17 commits into
software-mansion:mainfrom
kacperzolkiewski:add-codeblock
Nov 24, 2025
Merged

kacperzolkiewski merged 17 commits into
software-mansion:mainfrom
kacperzolkiewski:add-codeblock

Conversation

@kacperzolkiewski

@kacperzolkiewski kacperzolkiewski commented Nov 17, 2025

Copy link
Copy Markdown
Collaborator

Summary

Add support for codeblock.

Test Plan

Run Example app and play with codeblock

Screenshots

image

Compatibility

OS Implemented
iOS
Android ✅ (already handled that way)

@kacperzolkiewski
kacperzolkiewski marked this pull request as ready for review November 19, 2025 08:38

@szydlovsky szydlovsky left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting there!

Comment thread ios/utils/ParagraphAttributesUtils.mm Outdated
Comment thread ios/styles/H1Style.mm Outdated
Comment thread ios/styles/H2Style.mm Outdated
Comment thread ios/styles/H3Style.mm Outdated
Comment thread ios/styles/LinkStyle.mm Outdated
Comment thread ios/utils/ParagraphAttributesUtils.mm
Comment thread ios/utils/ZeroWidthSpaceUtils.mm Outdated
Comment thread ios/styles/CodeBlockStyle.mm Outdated
Comment thread ios/styles/LinkStyle.mm Outdated
Comment thread ios/utils/OccurenceUtils.h Outdated
Comment thread ios/utils/OccurenceUtils.mm Outdated
kacperzolkiewski and others added 2 commits November 20, 2025 08:21
Co-authored-by: Mikołaj Szydłowski <9szydlowski9@gmail.com>

@szydlovsky szydlovsky left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incredible work! Looks and functions really well 🔥

Comment thread README.md
@exploIF

exploIF commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator

Functionally it works well, however, I've noticed one issue. When you press backspace at beginning of the line it should remove style rather than go to previous line. I believe it should work the same as it works for block quote currently

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-11-24.at.14.18.21.mov

@kacperzolkiewski

Copy link
Copy Markdown
Collaborator Author

@exploIF we decided with @szydlovsky that when you press backspace it will go back to the previous line, it is expected behavior. When you look how for example Slack works with codeblock it works like that.

@szydlovsky

Copy link
Copy Markdown
Collaborator

Also, this way backspacing inside of a codeblock lets you just move stuff inside it instead of separating it into two codeblocks because style got removed for the line.

@exploIF

exploIF commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator

@kacperzolkiewski @szydlovsky So, this means that we also have to adjust that on Android, right now it's inconsistent

@kacperzolkiewski
kacperzolkiewski merged commit 571fa10 into software-mansion:main Nov 24, 2025
10 checks passed
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.

3 participants