Register Lost your password?
Full api documentation: full api documentation FREE version full api documentation PRO version

public function addBasicHTML(string $html = ‘<HTML />’, string $css = null)

This method allows you to transform HTML and CSS to WordML and add them into your Word document.

Parameters

$html

XHTML to add.

$css

CSS to add.

Examples

Example 1


require_once 'classes/CreateDocx.inc';

$docx = new CreateDocx();

$html= '<p>This will insert the name in the document: <strong>
          <span style="font-size:33px;">My name</span></strong></p>';

$docx->addHTML($html);

$docx->createDocx('example_basic_html');

    One Response

  • Scott Cronk

    This example does not show how to include the CSS file … please show an example for addBasicHTML(string $html = ‘’, string $css = null)