JSON API - createCharacterStyle
- addBarcode
- addBookmark
- addBreak
- addCaption
- addChart
- addComment
- addCrossReference
- addDateAndHour
- addDropCap
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addPageNumber
- addRuby
- addSimpleField
- addStructuredDocumentTag
- addSVG
- addTab
- addTable
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordML
- addWordFragment
- embedHTML
- addBackgroundImage
- addFooter
- addFooterSection
- addHeader
- addHeaderSection
- addLineNumbering
- addPageBorders
- addProperties
- addSection
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- modifyPageLayout
- removeFooters
- removeHeaders
- setBackgroundColor
- setCompatibilityMode
- setDefaultFont
- setDocumentDefaultStyles
- setLanguage
- setMarkAsFinal
- setRTL
- clearBlocks
- cloneBlock
- deleteBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- removeTemplateVariableImage
- replaceBlock
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHTML
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
- tickCheckboxes
createCharacterStyle
PREMIUM
TRIAL / ADVANCED
Creates a character style.
Note
You are reading the JSON API documentation. For the PHP API method please go to createCharacterStyle.
JSON data
| Key | Description |
|---|---|
| name | The name of the character style. |
| bold | If true the text will be shown in bold characters. |
| caps | If true displays text in capital letters. |
| characterBorder |
Adds a border to the character
|
| color | Hexadecimal color value: "FF0000", "000000"... |
| doubleStrikeThrough | If true displays text in doubleStrikeThrough. |
| em | Emphasis mark type: "none", "dot", "circle", "comma", "underDot" |
| emboss | Emboss style. |
| font |
string type: font family: "Arial", "Calibri"...
object type:
|
| fontSize | Text size in half-points: 8, 9, 10... Multiply by 2 to get the same size as using the fontSize property with addText and other methods. |
| hidden | Hide style from user interface. |
| italic | If true displays the text in italics. |
| locked | Style cannot be applied. |
| next | Style for next paragraph. |
| noProof | Ignore spelling and grammar errors. |
| outline | Outline style. |
| position | Position value. Positive value for raised and negative value for lowered. |
| semiHidden | Hide style from main user interface. |
| shadow | Shadow style. |
| strikeThrough | If true displays text in strikethrough. |
| subscript | If true displays text in subscript. |
| superscript | If true displays text in superscript. |
| underline | Underlines text. Possible values are: "single", "words", "double", "dotted", "dash" and "wave". |
| unhideWhenUsed | Remove semi-hidden property when style is used. |
| vanish | Uses a vanish style. |
| vertAlign | Vertical alignment. Possible values are: "baseline", "subscript" and "superscript". |
Code samples
Example #1
Release notes
- phpdocx 18.0:
- new action.
