1
0
mirror of https://github.com/flarum/core.git synced 2025-07-23 17:51:24 +02:00

New component for post excerpts, which will be shown in search results

Perhaps also in user activity stream. They are used in the mentions
extension.

In order to generate the excerpt, each formatter can implement a
“strip” method which basically converts block formatting into inline
formatting.
This commit is contained in:
Toby Zerner
2015-05-14 22:20:17 +09:30
parent 5c6eaefb1f
commit 4a7bd67199
6 changed files with 97 additions and 30 deletions

View File

@@ -12,6 +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.editTime = Model.prop('editTime', Model.date);
Post.prototype.editUser = Model.one('editUser');