addHtml
- getTemplateVariables
- getTemplateVariablesType
- processTemplate
- removeVariableAudio
- removeVariableImage
- removeVariableText
- removeVariableVideo
- replaceVariableAudio
- replaceVariableHtml
- replaceVariableImage
- replaceVariableList
- replaceVariablePptxFragment
- replaceVariableTable
- replaceVariableText
- replaceVariableVideo
- setTemplateSymbol
addHtml
BASIC / ADVANCED / PREMIUM
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 ü, and symbols such as ∞ or Ω, please check that the PHP Tidy extension and the PHP mbstring extension are installed and enabled.
If PHP Tidy can't be installed on the server, the forceNotTidy option can be enabled to transform HTML without using PHP Tidy. Please check Tips to convert HTML to PPTX (Transforming HTML without Tidy section) for more information.
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 | Default as false. 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. |
| useHtmlExtended | bool | If true allows using HTML Extended tags. Default as false. Only available in Premium licenses. |
-
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
-
phppptx_audio: add audio.
-
phppptx_image: add image.
-
phppptx_slide: add slide.
-
phppptx_svg: add SVG.
-
phppptx_video: add video.
PHP Tidy is not enabled.
Position not valid.
- phppptx 4.0:
- HTML Extended.
- improved adding alpha color styles.
- supported #rgba format to apply colors.
- 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.