Skip to content

Commit 3fd6b83

Browse files
shrunyanhubgit
authored andcommitted
added: allow user to provide prosemirror nodeViews (#18)
1 parent 0b87511 commit 3fd6b83

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

react-prosemirror/src/Editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class Editor extends React.Component {
2323

2424
this.forceUpdate()
2525
},
26-
attributes: this.props.attributes
26+
attributes: this.props.attributes,
27+
nodeViews: this.props.nodeViews
2728
})
2829
}
2930

react-prosemirror/src/HtmlEditor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class HtmlEditor extends React.Component {
4242
}
4343

4444
render () {
45-
const { autoFocus, options, attributes, render } = this.props
45+
const { autoFocus, options, attributes, render, nodeViews } = this.props
4646

4747
return (
4848
<Editor
@@ -51,6 +51,7 @@ class HtmlEditor extends React.Component {
5151
attributes={attributes}
5252
render={render}
5353
onChange={this.onChange}
54+
nodeViews={nodeViews}
5455
/>
5556
)
5657
}

0 commit comments

Comments
 (0)