Emoji provider, DDG working, style improvements

This commit is contained in:
Aviral Dasgupta 2016-06-17 04:58:09 +05:30
parent 769b3f0c2a
commit b9d7743e5a
8 changed files with 127 additions and 37 deletions

View file

@ -352,6 +352,10 @@ export default class MessageComposerInput extends React.Component {
} else {
this.onFinishedTyping();
}
if(this.props.onContentChanged) {
this.props.onContentChanged(editorState.getCurrentContent().getPlainText());
}
}
enableRichtext(enabled: boolean) {
@ -521,5 +525,8 @@ MessageComposerInput.propTypes = {
onResize: React.PropTypes.func,
// js-sdk Room object
room: React.PropTypes.object.isRequired
room: React.PropTypes.object.isRequired,
// called with current plaintext content (as a string) whenever it changes
onContentChanged: React.PropTypes.func
};