Implement basic bio formatting. closes flarum/core#203

This commit is contained in:
Toby Zerner
2015-08-04 11:41:47 +09:30
parent e6e2cdd3e9
commit b8a224f87b
3 changed files with 4 additions and 2 deletions

View File

@ -15,7 +15,7 @@ export default class User extends mixin(Model, {
avatarUrl: Model.attribute('avatarUrl'),
bio: Model.attribute('bio'),
bioHtml: computed('bio', bio => bio ? '<p>' + $('<div/>').text(bio).html() + '</p>' : ''),
bioHtml: computed('bio', bio => bio ? '<p>' + $('<div/>').text(bio).html().replace(/\n/g, '<br>').autoLink() + '</p>' : ''),
preferences: Model.attribute('preferences'),
groups: Model.hasMany('groups'),