meteorBuzz
meteorBuzz

Reputation: 3200

Meteor saving a line break inputed by the user within the input field

Is there a package with meteor that can allow me to save a line break within a string inputted by the user? If so, how can this be achieved?

Possibly creating a helper that generates the markdown on keypress which===13?

Upvotes: 1

Views: 249

Answers (1)

255kb - Mockoon
255kb - Mockoon

Reputation: 6974

A new line in a textarea will be saved in the database by default (the \n character). After loading the saved text you could either wrap it in a <pre> tag which will preserve que \n or convert all \n to <br> with a helper

Upvotes: 2

Related Questions