1
0
Fork 0

Display Html in statuses (#3)

This commit is contained in:
Vincent Jousse 2017-04-20 12:41:23 +02:00 committed by Nicolas Perriault
parent 317d406fc3
commit d381009894
2 changed files with 9 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import HtmlParser
import HtmlParser.Util exposing (textContent)
import HtmlParser.Util exposing (toVirtualDom)
import Mastodon
import Model exposing (Model, Msg(..))
@ -41,7 +41,7 @@ statusView status =
[ img [ class "avatar", src status.account.avatar ] []
, div [ class "username" ] [ text status.account.username ]
, div [ class "status-text" ]
[ HtmlParser.parse status.content |> textContent |> text ]
(HtmlParser.parse status.content |> toVirtualDom)
]

View File

@ -23,3 +23,10 @@
.username {
font-weight: bold;
}
.invisible {
font-size: 0;
line-height: 0;
display: inline-block;
width: 0;
}