public static function asText($richText)
    {
        $result = '';
        foreach ($richText as $block) {
            if (isset($block->text)) {
                $result .= $block->text . "\n";
            }
        }
        return $result;
    }