Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor display html formatted text in template

I'm using meteor 0.9.1.1.

I've just gotten mcrider:bootstrap-wysiwyg working for the body of a note or article. It saves to the mongo collection field just fine, but when I try to display it in a template, the html is display rather than applied. In other words something that should look like this:

  • lets keep this content
  • in a list
  • with lines
  • etc

instead shows all the raw html tags need to record the formatting along with the core text.

I hope there is a simple function I can pass it through to get the desired results.

Any ideas?

Thanks, Alex

like image 903
Alex Adams Avatar asked Dec 02 '22 15:12

Alex Adams


1 Answers

Use {{{field}}} instead of {{field}} in your HTML template if you want the HTML code in field to be interpreted as HTML code (and not escaped).

like image 116
Peppe L-G Avatar answered Dec 06 '22 19:12

Peppe L-G