You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find an app that uses native rendering to display a markdown code block:
But I've no idea how they implement it.
It has both:
round corner
background color
no extra space
The text was updated successfully, but these errors were encountered:
07akioni
changed the title
Is it possible to give padding to a range of text like html block?
Is it possible to give padding to a range of text like html inline block?
Mar 27, 2024
You can use insets on BackgroundStyle to add additional padding on any of the sides of the background. Have a look at the documentation here.
In the screenshot that you have shared in your comment, it seems that there is likely a half-space or no-break-space character used that is what is showing you additional padding in selection. You can use no-break-space like this:
let noBreakSpace = "\u{00a0}"
let text = "\(noBreakSpace)Test\(noBreakSpace)"
If you use noBreakSpace, you would not need to use insets on BackgroundStyle.
I find an app that uses native rendering to display a markdown code block:
But I've no idea how they implement it.
It has both:
The text was updated successfully, but these errors were encountered: