Is it possible to take an excerpt from the first rich text area in a matrix? I have blog articles set up on the site i'm working on to be built using a matrix, much the same way as in the features video about the matrix field. So it is entirely possible for an article to start with an image or a video.

What i'd like to be able to do is find the first text entry in the matrix and pull the first 155 characters out of it, creating an excerpt. The point of this is to pass that into a meta og:description tag (and i guess meta description too!)

Is it possible to do that with matrix content?
You can filter by block type: http://buildwithcraft.com/docs/matrix-fields#filtering-by-block-type

In short:

{% set ogDescription = false %}

{% for block in entry.myMatrixField.type('richText').limit(1) %}
  {% set ogDescription = block.text | striptags | slice(0, 155) %}
{% endfor %}

{% if ogDescription %}
  ...
{% endif %}


Also, this was suggested in the comments:

{{ entry.myMatrixField.type('richText').first() | striptags | slice(0, 155) }}