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
Thanks for the brilliant package. I'm not making this an issue, but I need help with how to implement text marking since I don't see how customTextRenderer can work for text that is broken up across textLayer items. Here is an example:
Using React-pdf, this text:
Is parsed into pieces in multiple elements like this:
So if I try to mark the text with a customTextRenderer like this: ({ str }) => str.replace(/multi-factor authentication/g, (value) => '<mark>${value}</mark>')
It will not work since the text is spread across multiple elements. Is there anyway to mark this text even though it's spread across multiple elements? In the live mozilla example they highlight it in parts:
but I don't know how they did that?
It seems like this PR may be helpful to this issue too: #1215
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Thanks for the brilliant package. I'm not making this an issue, but I need help with how to implement text marking since I don't see how customTextRenderer can work for text that is broken up across textLayer items. Here is an example:
Using React-pdf, this text:
Is parsed into pieces in multiple elements like this:
So if I try to mark the text with a customTextRenderer like this:
({ str }) => str.replace(/multi-factor authentication/g, (value) => '<mark>${value}</mark>')
It will not work since the text is spread across multiple elements. Is there anyway to mark this text even though it's spread across multiple elements? In the live mozilla example they highlight it in parts:
but I don't know how they did that?
It seems like this PR may be helpful to this issue too: #1215
Beta Was this translation helpful? Give feedback.
All reactions