Firebase Chat & Label HTML Content

With the release of nb181 we now have the HTMLContent property block for a label, which has made this demo much easier to deliver, bringing rich text and colour to separate entries in a single label. The new block retains all the html that was applied to a label entry, so that when you use the join block in a list loop to add the next item to the label, the formatting is not lost. in this way I was able to apply different colours to each user (who retained the same colour throughout the chat).

 I also wanted to try out using firebase as a chat store, which of course works well with the "Data Changed" event. 

The demo aia clears the chat when the app opens.



shows the entries in firebase for the chat



(you will need to add a firebase token and url of your choice to run this, and note that the focus is on demonstrating the htmlContent, the chat element probably only works properly for the single device)