Skip to content

Commit

Permalink
Merge pull request #2826 from marmelab/fix-rich-text-extra-p
Browse files Browse the repository at this point in the history
[RFR] Fix RichTextInput adds extra paragraph element after list items
  • Loading branch information
Gildas Garcia authored Jan 29, 2019
2 parents 92ac757 + ff8fbd5 commit d79410c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ra-input-rich-text/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class RichTextInput extends Component {

static defaultProps = {
addLabel: true,
options: {},
options: {}, // Quill editor options
record: {},
toolbar: true,
fullWidth: true,
Expand All @@ -34,11 +34,13 @@ export class RichTextInput extends Component {
const {
input: { value },
toolbar,
options,
} = this.props;

this.quill = new Quill(this.divRef, {
modules: { toolbar },
modules: { toolbar, clipboard: { matchVisual: false } },
theme: 'snow',
...options,
});

this.quill.setContents(this.quill.clipboard.convert(value));
Expand Down

0 comments on commit d79410c

Please sign in to comment.