@jpuri I'm sorry but I don't understand why you want to keep the <p> as the main tag. There are multiple <div> in that <p>, and it's not allowed, which is why this warning is showing.
Is there any reason for this? 'cause otherwise the warning will stay.
Hey @jpuri I think it's fine to use <p> within the content block, but I think we should definitely not nest divs inside the <p> tag. This is semantically incorrect and will result in error logs for any application that uses this wonderful library.
What issues would result from us transitioning from <p> to <div> or ensuring that <p> does not nest <div>s within it? How large would that transition be? If you look at a lib like Medium.js, they use <div>s and I'm starting to see that it may because of this issue.
These changes are already in develop and I will release this week. I am trying to slow down little on release cycles and releasing only well tested code.
from react-draft-wysiwyg.
Comments (16)
@jpuri I'm sorry but I don't understand why you want to keep the
<p>
as the main tag. There are multiple<div>
in that<p>
, and it's not allowed, which is why this warning is showing.Is there any reason for this? 'cause otherwise the warning will stay.
from react-draft-wysiwyg.
@orditeck , @vhmth : I am convinced about fixing this 😄 . I will redo changes of your pr, thanks a lot @orditeck , @vhmth.
from react-draft-wysiwyg.
Hey @jpuri I think it's fine to use
<p>
within the content block, but I think we should definitely not nest divs inside the<p>
tag. This is semantically incorrect and will result in error logs for any application that uses this wonderful library.What issues would result from us transitioning from
<p>
to<div>
or ensuring that<p>
does not nest<div>
s within it? How large would that transition be? If you look at a lib like Medium.js, they use<div>
s and I'm starting to see that it may because of this issue.from react-draft-wysiwyg.
Sweet! Seems like it works. :-)
from react-draft-wysiwyg.
@bnwan: which version of editor are you using ?
Also, this warning is not fatal - you can ignore for now, we will anyways soon fix it.
from react-draft-wysiwyg.
Hi @orditeck,
Thanks a lot for the PR. One of the reason that I kept it
and not
, thus I preferred
in editor also to preserve exact styling of margins.
But
~ Jyoti
from react-draft-wysiwyg.
Hello @orditeck,
Thinks got little delayed as I was on vacation. But I have to undo the these changes. The reason being that the generated mark-down and HTML use
tag thus to keep things consistent I would prefer to use
tag in editor also.
Plz share your thoughts about it.
from react-draft-wysiwyg.
@orditeck: WYSIWYG editor typically use
for normal text paragraphs and I would not prefer to deviate from it also you can see in output
tags are used for paragraphs.
Should I go ahead to close this issue ?
from react-draft-wysiwyg.
Closing the issue as there is no response.
from react-draft-wysiwyg.
https://www.opentest.co/share/bc85f010c0a511e693d2c326b54ba9c0
from react-draft-wysiwyg.
@jpuri I reinstall this package and we still get the warning "Warning: validateDOMNesting(...): < div > cannot appear as a descendant of < p >"
Red warning color is not good for an application. Please tell us if you pursue to continue using "< p >" instead of < div >
Thanks!
from react-draft-wysiwyg.
@bonniecool look at her comment right above mine.
from react-draft-wysiwyg.
@vhmth thanks! :-D
from react-draft-wysiwyg.
Hey @vhmth, @bonniecool:
These changes are already in develop and I will release this week. I am trying to slow down little on release cycles and releasing only well tested code.
from react-draft-wysiwyg.
The fix has been release in in version
[email protected]
.from react-draft-wysiwyg.
Just started to use this yesterday and getting the "Calling PropTypes validators..." warning. Any help is apprecaited. Thanks
from react-draft-wysiwyg.
Related Issues (20)
Recommend Projects
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
TensorFlow
An Open Source Machine Learning Framework for Everyone
Django
The Web framework for perfectionists with deadlines.
Laravel
A PHP framework for web artisans
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
web
Some thing interesting about web. New door for the world.
server
A server is a program made to process requests and deliver data to clients.
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Visualization
Some thing interesting about visualization, use data art
Game
Some thing interesting about game, make everyone happy.
Recommend Org
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
Microsoft
Open source projects and samples from Microsoft.
Google
Google ❤️ Open Source for everyone.
Alibaba
Alibaba Open Source for everyone
D3
Data-Driven Documents codes.
Tencent
China tencent open source team.
Jobs
Jooble