I am generating HTML from Lexical using $generateHTMLfromNodes
.
The HTML code I get is e.g. this one:
<p dir="ltr">
<span>Hello </span>
<s>
<i>
<em class="editor-text-strikethrough">crazy frog</em>
</i>
</s>
</p>
How can I get rid of:
- dir="ltr"
- class="editor-text-strikethrough
Also, why is there a span automagically inserted inside each <p></p>
-tag?
And why is there an <i>
and an <em>
when one would be sufficient?