如何将wp-editor textarea数据保存到包含html标签的php文件?

I am building a text editor function in my wordpress plugin. I need a suggestion, The function of my plugin is saving the wp-editor data to a php file including the html tags.

How i will get the wp-editor data including html tag?

My code snippet is

$content=" ";
$editor_id="templateEditor";
$settings  = array (
        'wpautop'          => true,  
        'media_buttons'    => true,  
        'textarea_name'    => $editor_id,   
        'textarea_rows'    => get_option( 'default_post_edit_rows', 23),  
        'tabindex'         => '',     
        'editor_css'       => '',     
        'editor_class'     => '',     
        'teeny'            => false,  
        'dfw'              => false, 
        'tinymce'          => true,  
        'quicktags'        => true,   
        'drag_drop_upload' => true    
);
<?php wp_editor( $content, $editor_id,$settings); ?> 

This above code I'm using to display the wp-editor in my plugin.

In editor I can see the text and visual part there its showing the my content with html tags. After submiting form I get plain text. I'm not getting the html tags which i can see in the text editor side.

Anybody could you please help me. To get the html tags also while submitting the wp-editor data.

Any modification I have to do when i receive the data /wp_editor function ?

enter image description here

Thank you

Take a look at this post I think it will give you the right direction - the answer with both htmlentities() + wpautop() Same problem and quite good solution - https://wordpress.stackexchange.com/questions/290118/how-to-save-wp-editor-html-content-in-options-table