set raw html in message
This commit is contained in:
parent
3dd6245d52
commit
87e84128ab
1 changed files with 2 additions and 1 deletions
|
@ -19,12 +19,13 @@ function formatDate(created_at) {
|
|||
|
||||
const Message = props => {
|
||||
const { user_image, user_name, message, created_at } = props
|
||||
const messageHtml = {__html: linker.link(message)}
|
||||
return (
|
||||
<div className="chat-message">
|
||||
<div className="chat-message-user">
|
||||
<img src={user_image} title={user_name} />
|
||||
</div>
|
||||
<div className="chat-message-text">{linker.link(message)}</div>
|
||||
<div className="chat-message-text" dangerouslySetInnerHTML={messageHtml}></div>
|
||||
<div className="chat-message-time">{formatDate(created_at)}</div>
|
||||
<div className="clearfloat"></div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue