AllowScriptCode Property

Rich Text Editor for PHP

RichTextEditor for PHP 8.0 Class Library

Editor.AllowScriptCode Property

Specifies whether to strip all script elements and script contents from the html to prevent javaScript injection. When this property is set to false (the default) Rich Text Editor strips all script elements and script contents from the html.

Example

<?php   
    $rte=new RichTextEditor();   
    $rte->Text="Type here"; 
    $rte->AllowScriptCode=true;   
    $rte->ID="Editor1";    
    $rte->MvcInit();
    echo $rte->GetString();  
    // use $_POST["Editor1"]to retrieve the data  
?> 

See Also

Editor Class | RTE Namespace