Add support for soft newlines in your draft-js editor.
npm install @jimmycode/draft-js-soft-newline-pluginThis is a plugin for draft-js-plugins-editor.
```
npm install @jimmycode/draft-js-soft-newline-plugin
`js`
import createSoftNewLinePlugin from '@jimmycode/draft-js-soft-newline-plugin';
const softNewLinePlugin = createSoftNewLinePlugin();
`js
import React from 'react';
import ReactDOM from 'react-dom';
import Editor from 'draft-js-plugins-editor';
import { EditorState } from 'draft-js';
import createSoftNewLinePlugin from '@jimmycode/draft-js-soft-newline-plugin';
const softNewLinePlugin = createSoftNewLinePlugin();
const plugins = [
softNewLinePlugin
];
class MyEditor extends React.Component {
constructor(props) {
super(props);
this.state = {
editorState: EditorState.createEmpty()
};
}
onChange = editorState => this.setState({ editorState });
render() {
return (
ReactDOM.render(
``