edfungus / Crouton

Crouton MQTT IOT Dashboard
http://crouton.mybluemix.net/
Other
291 stars 69 forks source link

Not able to create a multiline text in "crouton-simple-text" card #22

Open gerardovf opened 8 years ago

gerardovf commented 8 years ago

I'm trying to show a 'last alarms' list using "crouton-simple-text" card. I try to use '
' or '\n' as a line separator with no success. Thanks for your nice work!

edfungus commented 7 years ago

Try using the html break tag: <br>

gerardovf commented 7 years ago

I tried sending in the payload '{"value":"Text1
Text2"}' and the '
' it is not parsed and shown is just as plain text.

edfungus commented 7 years ago

Hmm, so I did some testing and I don't think there is a way to do multi-line there. A solution is to have each alarm be its own card

gerardovf commented 7 years ago

What I have done, as a workaround is to create a new 'crouton-double-text' dashboard element and changed the font to a monospace type. @import url(http://fonts.googleapis.com/css?family=Cutive+Mono);

crouton-double-text.zip

Then I send in the payload text without spaces (I use underscore) and it seems to work ok. croutondoubletext

gerardovf commented 7 years ago

Could you use this to do tables? https://github.com/showdownjs/showdown http://showdownjs.github.io/demo/

edfungus commented 7 years ago

Are you suggesting to have a card (maybe of varying sizes) that can display generic content derived from markdown?

gerardovf commented 7 years ago

Yes, sir. It would allow to create simple tables, lists,...