Hi Jan,
Thanks for contacting Syncfusion support.
Query : “I would like to remove default formating for RTE. Is it possible to disable this? Or just disable <style>...</style> section?”
You can achieve this by triggerring RTE create function and insert a required HTML into the document element.
Please find to the below code snippet:
<code>
#view
@{
Html.EJ().RTE("rteSample").Width("100%").Height("380px").ClientSideEvents(e => e.Create("RTEcreate")).Render();
}
<script type="text/javascript">
function RTEcreate(args)
{
var rteInstance = $("#rteSample").data("ejRTE");
// Insert HTML tag
rteInstance.getDocument().documentElement.innerHTML = "<head></head><body>RTE sample</body>";
}
</script>
</code>
We have prepared a sample to meet your requirement. Please find the sample from the link: : http://www.syncfusion.com/downloads/support/forum/123268/ze/MVCsample527264439
Note: If you remove default styles in RTE document, you will see the below cases :
1).In dark theme, RTE contents will not be shown because of removed body color (body{color:#5C5C5C;margin: 0px;text-indent: 8px;}).
2). Border will not be applied when using table caption because of removed caption border (.e-rte-table caption{border: 1px solid;border-bottom:none}) .
3). Body height is considered and calculated based on inner content because of removed body height (html,body{height:100%;width:100%;})
4).Font family dropdown will not be selected initially because of removed default font family (body{font-family:Times New Roman,Times,serif;display:inline-block;}) .
Please let us know the complete issue details, so that we can analyze more and provide an efficient solution.
Regards,
Arun P