mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Implement basic bio formatting. closes flarum/core#203
This commit is contained in:
parent
7154558239
commit
82e0f955e8
|
@ -9,6 +9,7 @@
|
|||
"color-thief": "v2.0",
|
||||
"mithril": "lhorie/mithril.js#next",
|
||||
"es6-micro-loader": "caridy/es6-micro-loader#v0.2.1",
|
||||
"fastclick": "~1.0.6"
|
||||
"fastclick": "~1.0.6",
|
||||
"autolink": "*"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ gulp({
|
|||
bowerDir + '/jquery.hotkeys/jquery.hotkeys.js',
|
||||
bowerDir + '/color-thief/js/color-thief.js',
|
||||
bowerDir + '/moment/moment.js',
|
||||
bowerDir + '/autolink/autolink.js',
|
||||
|
||||
bowerDir + '/bootstrap/js/affix.js',
|
||||
bowerDir + '/bootstrap/js/dropdown.js',
|
||||
|
|
|
@ -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'),
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user