GithubHelp home page GithubHelp logo

Comments (16)

orditeck avatar orditeck commented on August 23, 2024 7

@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.

jpuri avatar jpuri commented on August 23, 2024 5

@orditeck , @vhmth : I am convinced about fixing this 😄 . I will redo changes of your pr, thanks a lot @orditeck , @vhmth.

from react-draft-wysiwyg.

vhmth avatar vhmth commented on August 23, 2024 1

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.

vhmth avatar vhmth commented on August 23, 2024 1

Sweet! Seems like it works. :-)

from react-draft-wysiwyg.

jpuri avatar jpuri commented on August 23, 2024 1

@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.

jpuri avatar jpuri commented on August 23, 2024

Hi @orditeck,

Thanks a lot for the PR. One of the reason that I kept it

and not

is that generated HTML and MarkDown use syntax for

, thus I preferred

in editor also to preserve exact styling of margins.

But

may just work well and also fix the warning. I will merge the PR and check. Thanks a ton 😄

~ Jyoti

from react-draft-wysiwyg.

jpuri avatar jpuri commented on August 23, 2024

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.

jpuri avatar jpuri commented on August 23, 2024

@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.

jpuri avatar jpuri commented on August 23, 2024

Closing the issue as there is no response.

from react-draft-wysiwyg.

vhmth avatar vhmth commented on August 23, 2024

https://www.opentest.co/share/bc85f010c0a511e693d2c326b54ba9c0

from react-draft-wysiwyg.

bonniecool avatar bonniecool commented on August 23, 2024

@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.

vhmth avatar vhmth commented on August 23, 2024

@bonniecool look at her comment right above mine.

from react-draft-wysiwyg.

bonniecool avatar bonniecool commented on August 23, 2024

@vhmth thanks! :-D

from react-draft-wysiwyg.

jpuri avatar jpuri commented on August 23, 2024

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.

jpuri avatar jpuri commented on August 23, 2024

The fix has been release in in version [email protected].

from react-draft-wysiwyg.

bnwan avatar bnwan commented on August 23, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.