New NotionCodeBlock - fasteiner/Notion GitHub Wiki
Creates a new Notion code block object.
New-NotionCodeBlock [-Text <Object>] [-Caption <Object>] [-Language <Object>]
[<CommonParameters>]
This function creates a new instance of the notion_code_block class. You can create an empty code block, provide code text and language, or provide code text, caption, and language.
New-NotionCodeBlock -Text '$a = 1' -Language 'powershell'
Creates a code block with the specified text and language.
New-NotionCodeBlock -Text '$a = 1' -Caption 'Example' -Language 'powershell'
Creates a code block with the specified text, caption, and language.
New-NotionCodeBlock
Creates an empty code block.
The caption (rich_text[] or object) to be displayed above the code block.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The programming language for syntax highlighting in the code block.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The code text to be included in the code block.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.