PHP code example of hk-r / px2-pretty-html

1. Go to this page and download the library: Download hk-r/px2-pretty-html library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hk-r / px2-pretty-html example snippets


	$conf->funcs->processor->html = array(
		// htmlのインデントを整える
		'hk\pickles2\prettyHtml\prettyHtml::exec('.json_encode(array(
			// インデントに使用する文字を指定
			'indentation_character'=>"\t"
		)).')' ,
	);

	// タブがインデントとして挿入されます。
	'indentation_character'=>"\t"

	// 半角スペース4つがインデントとして挿入されます。
	'indentation_character'=>"    "

	// インデント対象外のエレメントを指定します。
	'exclusion_elements'=>array(
		'textarea', 'pre'
	),

	// インラインとして扱うエレメントを指定します。
	'inline_elements'=>array(
		'b', 'big', 'i', 'small', 'tt', 'abbr', 'acronym', 'cite', 'code', 'dfn', 'em', 'kbd', 'strong', 'samp', 'var', 'a', 'bdo', 'br', 'img', 'span', 'sub', 'sup'
	),