jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.38k stars 1.16k forks source link

Is there a way to remove <p> tag that is automatically added in react-draft-wysiwyg? #1386

Open fjuriolli opened 1 year ago

fjuriolli commented 1 year ago

I am using react-draft-wysiwyg and it automatically adds <p> tags when you either start typing or click on the textbox. Is there a way to remove these tags?

const [description, setDescription] = useState<EditorState>(
    EditorState.createEmpty()
  );

<Editor
  editorState={description}
  onEditorStateChange={setDescription}
  editorClassName='editor'
  toolbarClassName='toolbar'
/>