-
-
Notifications
You must be signed in to change notification settings - Fork 28
Add excerpt() function to editor #159
Comments
You can do |
This would only work with 300 chars if the first block contains those 300 chars, not the first x blocks summed together, right @nilshoerrmann? I think the excerpt() method works with 300 chars however they are organized/structured (simply because it's just one field with no structure at all). Edit: It might work out to do |
I think the method is not available on the full blocks collection, only on a single block. But I haven't checked. |
Works: Not working: The |
That's what I thought. Should not be to difficult to have this available on the blocks collection as well. |
✅ |
I would like to convert this line easily from textarea to editor:
$article->text()->html()->excerpt(300)
Right now, it seems that excerpt() isn't supported. A workaround seems to be this:
https://forum.getkirby.com/t/excerpt-for-editor-field/15970
The text was updated successfully, but these errors were encountered: