Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: also export spanToPlainText from @portabletext/toolkit #178

Closed
fvieira opened this issue Dec 18, 2024 · 2 comments · Fixed by #180, #166 or #182
Closed

Suggestion: also export spanToPlainText from @portabletext/toolkit #178

fvieira opened this issue Dec 18, 2024 · 2 comments · Fixed by #180, #166 or #182
Labels
enhancement New feature or request

Comments

@fvieira
Copy link

fvieira commented Dec 18, 2024

In order to build a custom component that needs to know the size of the text it will render, I had to install @portabletext/toolkit just to get access to spanToPlainText. It would be nice if this library exported it too, just like it exports toPlainText.

@theisel
Copy link
Owner

theisel commented Dec 18, 2024

Hi @fvieira, thanks for the suggestion! I'll add spanToPlainText to the exports and plan to release a new version later today.

@theisel theisel added the enhancement New feature or request label Dec 18, 2024
theisel added a commit that referenced this issue Dec 18, 2024
- Adds export for `spanToPlainText` from @portabletext/toolkit
- Updated `utility-functions.md` documentation

Closes #178
This was referenced Dec 18, 2024
@fvieira
Copy link
Author

fvieira commented Dec 18, 2024

@theisel Wow, that was fast! Thanks a lot, I've updated my code and removed the extra dependency.

This was referenced Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment