WordPress at a glance
function is not described

media_send_to_editor() WP 2.5.0

Adds image html to editor

No Hooks.

Return

Nothing (null).

Usage

media_send_to_editor( $html );
$html(string) (required)

Code of media send to editor: wp-admin/includes/media.php WP 5.2.1

<?php
function media_send_to_editor( $html ) {
	?>
<script type="text/javascript">
var win = window.dialogArguments || opener || parent || top;
win.send_to_editor( <?php echo wp_json_encode( $html ); ?> );
</script>
	<?php
	exit;
}