hello,
first, thanks for this nice component, it is very useful!
i ran into an issue because i need to render MathJax components inside <p> elements (and i cannot change that); this causes an annoying React warning: "Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>."
(+ this warning actually makes sense since it is not semantically correct to put <div> inside <p>)
i wondered if you would accept a PR that allows to configure the tag, ex:
React.createElement(tag, ...) where "tag" is a new prop of MathJaxPreview instead of the "hardcoded" <div> s that are actually rendered?
by having a defaultProps for "tag" of 'div', the behaviour would remain the same than today and i (+ others) could use this new props to avoid similar problems.
hello, first, thanks for this nice component, it is very useful!
i ran into an issue because i need to render MathJax components inside
<p>
elements (and i cannot change that); this causes an annoying React warning: "Warning: validateDOMNesting(...):<div>
cannot appear as a descendant of<p>
." (+ this warning actually makes sense since it is not semantically correct to put<div>
inside<p>
)i wondered if you would accept a PR that allows to configure the tag, ex:
React.createElement(tag, ...)
where "tag" is a new prop of MathJaxPreview instead of the "hardcoded"<div>
s that are actually rendered? by having a defaultProps for "tag" of 'div', the behaviour would remain the same than today and i (+ others) could use this new props to avoid similar problems.