SaveButtonScript Property

Rich Text Editor for PHP

RichTextEditor for PHP 8.0 Class Library

Editor.SaveButtonScript Property

Defines the javascript function that will be executed when clicking the "save" button. If it returns false, the submit event will be cancelled. Editor1.SaveButtonScript="return mysubmitfunc()";

Example

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

See Also

Editor Class | RTE Namespace