Skip to content

Access the parts of a Markdown Text #217

Answered by gonzalezreal
georgbachmann asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @georgbachmann,

It depends on how you'd like the UI to trigger the text-to-speech. With the changes introduced in MarkdownUI 2.1.0, you can access a plain text representation of any MarkdownContent value by using renderPlainText().

So, depending on what you want to do, you can construct a MarkdownContent value and get its text representation before creating a Markdown view, or you can access the MarkdownContent value of a specific type of block (i.e., a paragraph) by overriding its style.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@georgbachmann
Comment options

@gonzalezreal
Comment options

Answer selected by gonzalezreal
@georgbachmann
Comment options

@ChuanqingYang
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants