diff --git a/src/components/content.js b/src/components/content.js index ef3f98c7d..1b2877796 100644 --- a/src/components/content.js +++ b/src/components/content.js @@ -62,7 +62,8 @@ class Content extends React.Component { spellCheck: Types.bool.isRequired, state: Types.object.isRequired, style: Types.object, - tabIndex: Types.number + tabIndex: Types.number, + tagName: Types.string } /** @@ -72,7 +73,8 @@ class Content extends React.Component { */ static defaultProps = { - style: {} + style: {}, + tagName: 'div' } /** @@ -826,7 +828,8 @@ class Content extends React.Component { render() { const { props } = this - const { className, readOnly, state, tabIndex, role } = props + const { className, readOnly, state, tabIndex, role, tagName } = props + const Container = tagName const { document } = state const children = document.nodes .map(node => this.renderNode(node)) @@ -855,7 +858,7 @@ class Content extends React.Component { debug('render', { props }) return ( -
{children} {this.props.children} -
+ ) } diff --git a/src/plugins/core.js b/src/plugins/core.js index f88e0c567..b1b4cf8ea 100644 --- a/src/plugins/core.js +++ b/src/plugins/core.js @@ -962,6 +962,7 @@ function Plugin(options = {}) { state={state} style={props.style} tabIndex={props.tabIndex} + tagName={props.tagName} /> ) }