Hello i'm trying to insert a html text into my header.
$entete = "<p>Hello</ br> By</p>";
I don't know how i must to do ....
Could you help me ?
Hello i'm trying to insert a html text into my header.
$entete = "<p>Hello</ br> By</p>";
I don't know how i must to do ....
Could you help me ?
Hello,
You can add HTML to body, headers, footers, footnotes, endnotes and comments using the embedHTML method. You need to use this option:
'target' (string) document (default value), defaultHeader, firstHeader, evenHeader, defaultFooter, firstFooter, evenFooter, footnote, endnote and or comment.
Regards.
Hello,
Sure, here you're:
$docx= new CreateDocx();
$html= '<p style="border: 2px solid black; color: red">A short text with a red border.</p>';
$rawWordML = $docx->embedHTML($html, array('rawWordML' => true, 'target' => 'defaultHeader'));
$html = $docx->createWordMLFragment(array($rawWordML));
$docx->addHeader(array('default' => $html));
$docx->createDocx('example_embedSimpleHTML');
Regards.