-
It would be great if I could do something like this: and have the TOC render it as well, so readers can immediately see what sections of a document are work in progress. Is there a way to make this work? I think this would be good as default behavior but maybe that's just me 🤷♂️ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The TOC headings are historically converted as strings It is possible in the future that we'll support JSX in TOC better in the future, as explained in this PR comment: #9773 (review) However, I believe what you want to achieve is somehow possible already with some limitations, considering we use An example is the RN website. https://reactnative.dev/docs/accessibilityinfo#getrecommendedtimeoutmillis-android ### `getRecommendedTimeoutMillis()` <div class="label android">Android</div> It's open source so you can try to copy their html/CSS and adjust this to your needs |
Beta Was this translation helpful? Give feedback.
The TOC headings are historically converted as strings
It is possible in the future that we'll support JSX in TOC better in the future, as explained in this PR comment: #9773 (review)
However, I believe what you want to achieve is somehow possible already with some limitations, considering we use
dangerouslySetInnerHTML
from React you could use simple HTML tags in headingsAn example is the RN website.
https://reactnative.dev/docs/accessibilityinfo#getrecommendedtimeoutmillis-android
### `getRecommendedTimeoutMillis()` <div class="label android">Android</div>
It's open source so you can try to copy their html/CSS and adjust this to your needs