include_once ("html2text.inc");
$FieldName = $this -> _getCollectionFieldName($CollectionID, '3');
$htmlToText = new Html2Text ($ColumnValues[$FieldName], 1200);
$Value = $this->db->quote(limit_text($htmlToText->convert(), 100));


function limit_text($text, $limit) {
    $text = strip_tags($text);
      $words = str_word_count($text, 2);
      $pos = array_keys($words);
      if (count($words) > $limit) {
          $text = substr($text, 0, $pos[$limit]) . ' ...';
      }
    return $text;
    }