AutoFocus Property

Rich Text Editor for PHP

RichTextEditor for PHP 8.0 Class Library

Editor.AutoFocus Property

Specifies whether the editor grabs focus when the page loads. If this property is set to true then the editor will take focus, if it is set to false it will not.

Example

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

See Also

Editor Class | RTE Namespace