BoldDeskBoldDesk is now live on Product Hunt with a special offer: 50% off all plans. Let's grow together! Support us.
We are actually using a markdown editor with two screens 1 for the markdown input and the other for preview . we convert the markdown to html and feed it to the preview window. our markdown editor also takes raw html sometimes
when we try to add raw html in the markdown editor we get a good preview, as it works for most cases but not for the style tag= <style> . this ignores the style tags completely in the preview and none of the styles are added .
I also tested out the demo on your page and it does not seem to work - https://blazor.syncfusion.com/demos/rich-text-editor/markdown-overview?theme=bootstrap4.
would be great to have some assistance
Thanks ym
Hi Ym,
To resolve this issue, we recommend setting the EnableHtmlSanitizer property to false into preview, which will allow you to add raw HTML and ensure that the styles are properly applied in the preview. Please note that by default, EnableHtmlSanitizer is set to true to avoid cross-scripting site attacks.
To implement this solution, please use the following code:
<SfRichTextEditor EnableHtmlSanitizer="false> </SfRichTextEditor> |
We have also attached a sample for your reference. You can find more information about EnableHtmlSanitizer in our API documentation, which is available at this
If you prefer not to disable the EnableHtmlSanitizer property for the preview, you can always add your styles into the application end.
Regards,
Vinothkumar