Skip to content

Commit e5ddf8c

Browse files
committed
Merge pull request #12 from Frontwise/inline_support
[added] inline support
2 parents e009c49 + eaf81a2 commit e5ddf8c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

lib/components/TinyMCE.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,21 @@ const TinyMCE = React.createClass({
6969
},
7070

7171
render() {
72-
return (
73-
<textarea
74-
id={this.id}
75-
defaultValue={this.props.content}
76-
/>
77-
);
72+
if (this.props.config.inline) {
73+
return (
74+
<div
75+
id={this.id}
76+
dangerouslySetInnerHTML={ {__html: this.props.content} }
77+
/>
78+
);
79+
} else {
80+
return (
81+
<textarea
82+
id={this.id}
83+
defaultValue={this.props.content}
84+
/>
85+
);
86+
}
7887
},
7988

8089
_init(config, content) {

0 commit comments

Comments
 (0)