Rejig formatting API. closes flarum/core#85

It works but it’s not the most pretty thing in the world. @franzliedke
Would be great if you could take a look at the whole formatting API and
work your magic on it sometime… my brain is fried!
This commit is contained in:
Toby Zerner
2015-06-04 10:48:07 +09:30
parent 9487a56d61
commit 42851f425b
8 changed files with 87 additions and 26 deletions

View File

@ -12,7 +12,7 @@ Post.prototype.user = Model.one('user');
Post.prototype.contentType = Model.prop('contentType');
Post.prototype.content = Model.prop('content');
Post.prototype.contentHtml = Model.prop('contentHtml');
Post.prototype.excerpt = Model.prop('excerpt');
Post.prototype.contentPlain = computed('contentHtml', contentHtml => $('<div/>').html(contentHtml.replace(/(<\/p>|<br>)/g, '$1 ')).text());
Post.prototype.editTime = Model.prop('editTime', Model.date);
Post.prototype.editUser = Model.one('editUser');