Closed omnine closed 5 months ago
That P tag is there for a reason - otherwise if you just use a regular Hello world
string (which, I believe, is what the placeholders usually look like), it will not match the styling of the editor.
While I understand how this is theoretically a "bug", fixing it is not worth it, IMO. if you insist on multiline placeholders, you can use <br />
.
Then I would argue the placeholder
is not a true ReactNode
I am afraid.
There's no need to argue of course. Feel free to fork and change the code to match to your requirements. I will fully refund your purchase.
The data type of
placeholder
isReactNode
, which is very good, so I tried,<MDXEditor markdown='' placeholder={(<><p>Line 1</p><p>Line 2</p></>)}/>
The Dev-Tools console reported,
The html element showed,
<div class="_contentEditable_11eqz_352 _placeholder_11eqz_1034"><p><p>Line 1</p><p>Line 2</p></p></div>