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'm working on a project where I'm styling individual chars of a single word. I do not need any hyphenation and prefer just to break between words on whitespace. But as I want to color individual characters I need to break up words in my text like this:
<Text>This is a great arti<Text style={{ color: "red" }}>c</Text>le</Text>
The hyphenation callbacks currently would get "This", "is", "a", "great", "arti", "c", "le". And would potentially add a break in the middle of the word. In my case I don't want that.
Not the best screenshot but it gives some idea:
This is a PDF viewer where you see the hyphenation appear and on top is the same rendered in HTML
(In case you're curious, this is all rendered as wrapped containers (per letter or sometimes combination). For this to work I've been tinkering with React-PDF to add margin/padding support for sub containers. So far it seems to be working quite nicely. Also applying border radius on background of a sub container - once I'm more in a finished state with this I'll create a PR with that code)
Desktop (please complete the following information):
OS: Windows
Browser Edge
React-pdf version latest master
The text was updated successfully, but these errors were encountered:
I'm working on a project where I'm styling individual chars of a single word. I do not need any hyphenation and prefer just to break between words on whitespace. But as I want to color individual characters I need to break up words in my text like this:
The hyphenation callbacks currently would get "This", "is", "a", "great", "arti", "c", "le". And would potentially add a break in the middle of the word. In my case I don't want that.
Not the best screenshot but it gives some idea:
This is a PDF viewer where you see the hyphenation appear and on top is the same rendered in HTML
(In case you're curious, this is all rendered as wrapped containers (per letter or sometimes combination). For this to work I've been tinkering with React-PDF to add margin/padding support for sub containers. So far it seems to be working quite nicely. Also applying border radius on background of a sub container - once I'm more in a finished state with this I'll create a PR with that code)
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: