diff --git a/lib/react/message.jsx b/lib/react/message.jsx index 9a3e91f..9899cb6 100644 --- a/lib/react/message.jsx +++ b/lib/react/message.jsx @@ -38,6 +38,12 @@ var Chatroom = React.createClass({ socket.emit("message:refresh", {}); }, + loadMoreMessages() { + socket.emit("message:refresh", { + // before: + }); + }, + sendMessage(message) { socket.emit("newMessage", {message: message}); }, @@ -58,6 +64,12 @@ var Chatroom = React.createClass({
{this.messageContent()}
+{this.messageContent()}
); diff --git a/public/css/app.css b/public/css/app.css index 80f7152..024d41b 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -8,6 +8,14 @@ html, body { /*Chat*/ +.wordwrap { + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ +} + #chatroom { margin-top: 1em; }