1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Implement basic bio formatting. closes flarum/core#203

This commit is contained in:
Toby Zerner
2015-08-04 11:41:47 +09:30
parent 7154558239
commit 82e0f955e8
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'),