Function __global->html_to_comcode

Definitions

sources/comcode.php

  • Convert (X)HTML into Comcode.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$html LONG_TEXT No No required parameter N/A N/A The HTML to be converted
$force boolean No No True N/A N/A Whether to force full conversion regardless of settings

Returns

  • The equivalent Comcode
  • Type: LONG_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Convert (X)HTML into Comcode.
 *
 * @param  LONG_TEXT $html The HTML to be converted
 * @param  boolean $force Whether to force full conversion regardless of settings
 * @return LONG_TEXT The equivalent Comcode
 */

function html_to_comcode(string $html, bool $force = true) : string