oreosonic.blogg.se

Draft js get plain text
Draft js get plain text










draft js get plain text
  1. #DRAFT JS GET PLAIN TEXT SOFTWARE#
  2. #DRAFT JS GET PLAIN TEXT CODE#

However, let's remember to be empathetic in our speech to others as we try to reach understanding If you read the thread, I think you'll see that we're all fine with Draft.js not supporting HTML export. Of course there is plenty of room for improvement in the open source community, especially communication between contributors to projects, developers using libraries, new contributors being onboarded, developers new to using a library, etc. Demanding that a library provide new functionality not a part of its intended use case seems unfair. While I would love for Draft.js to provide the functionality of exporting convertToHTML by default, it is important to clarify that this is not the common use case of the Draft.js library.

#DRAFT JS GET PLAIN TEXT SOFTWARE#

The power behind Github's platform lies in its ability to empower software developers to share solutions to problems that other developers might be encountering. When discovered the need to convert the Editor state to HTML, he developed and published a module providing that functionality.

#DRAFT JS GET PLAIN TEXT CODE#

The wonderful thing about Github is that it provides a platform for developers to share the code they write with others.

draft js get plain text draft js get plain text

Furthermore, other developers (like those on this thread and myself) would benefit from a function converting Editor state to HTML, in order to use this exported HTML outside of the React view rendering model, e.g. This fact seems to imply that contributors to Draft.js realized some developers consuming the Draft.js library might want to hydrate the state of the Editor with HTML. In fact, looking at the history of Draft.js, the library didn't even ship with the now included convertFromHTML function this functionality was added 18 days later. The common case of using Draft.js with React means that the React library (not Draft.js) handles rendering all React components, including the Draft.js Editor, to HTML. With that in mind, it makes sense that the Draft.js library doesn't have a convertToHTML function by default. Facebook developers like decided to open source Draft.js, a React component built for use with the React library specifically.












Draft js get plain text