Open Raghvender-Kataria opened 4 years ago
Any clues?
This style map actually gets rendered on the web. So, CSS supported styles as shown in this document will work.
for eg: fontSize: "16px"
@DaniAkash how are we able to style the markdown within the webview? It shows there's a styleSheet
prop that takes in a CSS string, but nothing I've added seems to work. I've tried things like:
styleSheet={"font-size: 16px"}
or styleSheet={{ fontSize: 16 }}
or styleSheet={"fontSize: 16px"}
and nothing seems to actually apply styles to it. I specifically want to change the height and the fontFamily of the rendered HTML.
@coopdog95 styleSheet={`.DraftEditor-root {padding: 16px; font-family: 'Arial'} .public-DraftStyleDefault-block {margin-bottom: 8px} li > .public-DraftStyleDefault-block {margin-bottom: 4px !important;}`}
I want to assign some custom fontsize and font family. I tried to put in below code in styleMap prop of "RNDraftView" but it did not appear on editor. const styleMap = { CODE: { fontFamily: '"Inconsolata", "Menlo", "Consolas", monospace', fontSize: 16, padding: 2, }, };
Any clues?