Skip to content

Commit 883d384

Browse files
committed
Better syntax
1 parent 40ccfe7 commit 883d384

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

lib/components/TinyMCE.js

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,19 @@ const TinyMCE = React.createClass({
7676
},
7777

7878
render() {
79-
if (this.props.config.inline) {
80-
return (
81-
<div
82-
id={this.id}
83-
className={this.props.className}
84-
dangerouslySetInnerHTML={ {__html: this.props.content} }
85-
/>
86-
);
87-
} else {
88-
return (
89-
<textarea
90-
id={this.id}
91-
className={this.props.className}
92-
defaultValue={this.props.content}
93-
/>
94-
);
95-
}
79+
return this.props.config.inline ? (
80+
<div
81+
id={this.id}
82+
className={this.props.className}
83+
dangerouslySetInnerHTML={{__html: this.props.content}}
84+
/>
85+
) : (
86+
<textarea
87+
id={this.id}
88+
className={this.props.className}
89+
defaultValue={this.props.content}
90+
/>
91+
);
9692
},
9793

9894
_init(config, content) {

0 commit comments

Comments
 (0)