独立的php脚本:插入查询适用于大型内容(300kb),但是typo3不保存相同的内容

I have standalone PHP script which inserts my 300kb of HTML data into MYSQL table correctly

$sql = "INSERT INTO tt_content 
          (pid, CType, bodytext, cruser_id, header) 
        VALUES 
          (26124, 'text', '".mysql_real_escape_string($data)."', 1,'" . $heading . "')";

But Typo3 doesn't save the same content inserted via its editor.

It seems to be the problem with my typo3 configuration or typo3 problem?

The content of an RTE field is parsed on the way into the database. So perhaps you run out of time (max_execution_time is to low) or out of memory (memory_limit is to low). Try to adjust that settings.