addHtml
- getTemplateVariables
- getTemplateVariablesType
- removeVariableAudio
- removeVariableImage
- removeVariableText
- removeVariableVideo
- replaceVariableAudio
- replaceVariableHtml
- replaceVariableImage
- replaceVariableList
- replaceVariablePptxFragment
- replaceVariableTable
- replaceVariableText
- replaceVariableVideo
- setTemplateSymbol
addHtml

Inserts HTML and CSS into the PowerPoint presentation.
This method allows the insertion of HTML into the PowerPoint presentation.
To embed accents and other non-ASCII characters such as á or ü, please check that the PHP Tidy extension and the PHP mbstring extension are installed and enabled.
html
HTML and CSS content to be transformed.
position
Key | Type | Description |
---|---|---|
placeholder | array |
The content is added in a placeholder of the layout. One of the following options can be used to get the text box.
|
new | array |
A new position is generated.
|
options
Key | Type | Description |
---|---|---|
disableWrapValue | bool | If true disable using a wrap value with Tidy to prevent extra blank spaces. Default as false. |
forceNotTidy | bool | False as default. If true, avoid using Tidy. Only recommended if Tidy can't be installed. |
insertMode | string |
Insert mode if the position contains an existing content:
Default as append. |
parseCSSVars | bool | If true parses CSS variables. |
-
a tags
- see text element styles
-
br tags
-
p, h1, h2, h3, h4, h5, h6, li tags
- background-color
- dir: ltr, rtl
- text-align: left, center, right
-
ul, ol tags
- list-style-type: disc, circle, square, decimal, lower-alpha, lower-latin, lower-roman, upper-alpha, upper-latin, upper-roman, and PowerPoint list style names
-
span, b, cite, em, i, s, strong, var tags
- see text element styles
-
text element styles
- background-color
- color
- font-family
- font-size
- font-style: italic, oblique
- font-weight: bold, bolder, 700, 800, 900
- letter-spacing
- text-decoration: line-through, underline
PHP Tidy is not enabled.
Position not valid.
- phppptx 3.5:
- list tags (ul, ol, li).
- improved handle br tags.
- phppptx 3.0:
- CSS variables.
- root and only-child selectors.
- improved CSS media query handling.
- CSS 8-digit HEX colors added as 6-digit HEX colors.
- phppptx 2.5:
- default HTML content when adding an empty content.
- phppptx 2.0:
- breaks.
- phppptx 1.0:
- new method.