1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 14:10:37 +02:00

Implement TextFormatter for posts

Get rid of formatting on user bios, we'll do that with JavaScript
This commit is contained in:
Toby Zerner
2015-07-22 16:03:48 +09:30
parent 6c50f1614b
commit a0fe68272c
15 changed files with 243 additions and 1973 deletions

View File

@@ -35,7 +35,7 @@ export default class UserBio extends Component {
let subContent;
if (this.loading) {
subContent = <p className="UserBio-placeholder">{LoadingIndicator.component()}</p>;
subContent = <p className="UserBio-placeholder">{LoadingIndicator.component({size: 'tiny'})}</p>;
} else {
const bioHtml = user.bioHtml();

View File

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