One of the difficult problems for this module will be deciding how to render the markdown. Currently I'm using native views (a mix of Text and View) however this has already proven to be quite limiting due to React Native's inability to render anything other than Text inside a Text element. This module uses the Text element for layout out blocks, which is currently the limiting factor in being able to implement non-Text based elements. I'm using Text for blocks because it supports word wrapping. I believe that if at some point css-layout is updated to support row wrapping, then we may be able to layout the Text elements inside a View. If we can layout Text elements inside a View in such a way that they wrap like they would in a Text element then I think this would solve the rendering issue.
Maybe @vjeux can comment on whether or not this can be done.
Alternatively, we can use a transparent WebView and render the Markdown as HTML - but this comes with other caveats such as HTML sanitation and layout.
One of the difficult problems for this module will be deciding how to render the markdown. Currently I'm using native views (a mix of
Text
andView
) however this has already proven to be quite limiting due to React Native's inability to render anything other thanText
inside aText
element. This module uses theText
element for layout out blocks, which is currently the limiting factor in being able to implement non-Text based elements. I'm usingText
for blocks because it supports word wrapping. I believe that if at some pointcss-layout
is updated to support row wrapping, then we may be able to layout theText
elements inside aView
. If we can layoutText
elements inside aView
in such a way that they wrap like they would in aText
element then I think this would solve the rendering issue.Maybe @vjeux can comment on whether or not this can be done.
Alternatively, we can use a transparent
WebView
and render the Markdown as HTML - but this comes with other caveats such as HTML sanitation and layout.