Use the below code snippet to copy the content as HTML instead of text.
if ( ! function_exists( 'prefix_copy_as_html_localize_vars' ) ) : /** * Localize vars. * * @return array */ function prefix_copy_as_html_localize_vars( $args = array() ) { $args['copy_content_as'] = 'html'; return $args; } add_filter( 'copy_the_code_localize_vars', 'prefix_copy_as_html_localize_vars' ); endif;