Fail-proof/fallback way of rendering any kind of content/code #213
Replies: 2 comments 3 replies
-
I should be able to help you further if you give some concrete examples of the issues you're facing. Can you replicate the problem you have currently in a code sandbox? You can fork this one. |
Beta Was this translation helpful? Give feedback.
-
Thank you, that was useful. I managed to allocate some time today to do a deeper dive on the way errors are handled. In fact, I used one of your examples, as it revealed an interesting case with the default jsx parser. Now, parsing JSX as markdown is obviously not possible, but, if you're using the diff/source mode you will be able to let the users edit the content somehow. Take a look at the newly published help article on the matters and test the latest release. Happy to continue this conversation further. |
Beta Was this translation helpful? Give feedback.
-
Is there some kind of setup/plugin config you'd recommend for trying to render as many different file formats as possible? I'm building a note taking app in which some notes contain weird bits of unstructured code and I get weird lexical errors. I've tried various plugin configs including the ALL_PLUGINS config that I found somewhere in the docs. Can anyone point me in the right direction in terms of the optimal setup for fail proof rendering?
Also, something I'm now noticing is that often times pasting markdown works fine but passing the same in through the content prop fails. (I'm using Vite in an electron app btw for this)
Many thanks :)
Beta Was this translation helpful? Give feedback.
All reactions