addslashes()? If using PDO, your best bet would be to use a prepared statement with a bound parameter, something like:
$stmt = $pdo->prepare("INSERT INTO my_table (text_column_name) VALUES (:text)");
$stmt->execute(array(':text' => $text['txtEditor']));
Then just let PDO take care of whatever types of escaping need to be done for the DBMS being used.