media_send_to_editor()WP 2.5.0

Adds image HTML to editor.

No Hooks.

Return

null. Nothing (null).

Usage

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

Changelog

Since 2.5.0 Introduced.

media_send_to_editor() code WP 6.6

<?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;
}