Function __global->add_wysiwyg_comcode_markup

Definitions

sources/comcode_compiler.php

  • Output a Comcode tag in WYSIWYG-editor format, for tidy editing.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$tag string No No required parameter N/A N/A The Comcode tag
$attributes array No No required parameter N/A N/A The parameters
$embed Tempcode No No required parameter N/A N/A The contents of the tag
$semihtml boolean No No required parameter N/A N/A Whether we are in semihtml mode. We are always in semi-parse mode
$method ?integer No No Null N/A N/A Display method (null: auto-detect)
$html_errors boolean No No False N/A N/A Whether HTML structure errors have been spotted so far (limits how $semiparse_mode rendering works)

Returns

  • The HTML (null: render as native HTML)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Output a Comcode tag in WYSIWYG-editor format, for tidy editing.
 *
 * @param  string $tag The Comcode tag
 * @param  array $attributes The parameters
 * @param  Tempcode $embed The contents of the tag
 * @param  boolean $semihtml Whether we are in semihtml mode. We are always in semi-parse mode
 * @param  ?integer $method Display method (null: auto-detect)
 * @param  boolean $html_errors Whether HTML structure errors have been spotted so far (limits how $semiparse_mode rendering works)
 * @return ?string The HTML (null: render as native HTML)
 */

function add_wysiwyg_comcode_markup(string $tag, array $attributes, object $embed, bool $semihtml, ?int $method = null, bool $html_errors = false) : ?string