How to send "<br>" element to client in meteor?


#1

How to send “
” element to client in meteor?


#2

What do you want to achieve?


#3

I wan to see each text I’m sending from server to client in another line.
I tried with ‘\n’ (it is working only for java script) and with “br” tag but it considering it as a string rather than element.


#5

So you have a string like this Some text <br> some more text <br> ... ? Or how does this look?


#6

Actually I am sending text to client which has to be shown to the user in the different lines as parts.
If any way to do it please suggest it or with “br” tag how to parse at client side.
Thank you.


#7

Can you provide an example? Its hard to help if I have to guess everythin :slight_smile:


#8

Thank you for your time,

Actually I’m preparing chat app, for that Whenever same user pushed chat msg consequently I have to merge last msg with previous one so both will be shown in one div only.
But while rendering it is coming as one line, rather than each msg could be shown in different line so I added one “\n”/“br” to each msg. so i thought it will make the msgs in differednt line but not.

One of the guy sugggested in Handle bars If we use {{{something}}} triple slash it will parse html element. But Meteor/Blaze is using Spacebars it is not allowing.
-sorry I think {{{something}}} is helping me, now those are coming in another line.

Thanks once again. :slight_smile:


#9

While it may work, I still think it’s not the best way to implement such a feature. Don’t use div or br on the server, just do such stuff on the client in each loops.