New NotionRichText - fasteiner/Notion GitHub Wiki

New-NotionRichText

SYNOPSIS

Creates a new Notion rich text block object.

SYNTAX

Text

New-NotionRichText [[-Type] <String>] [[-Annotations] <Object>] [[-Text] <String>] [[-Link] <Object>]
 [<CommonParameters>]

ConvertFromMarkdown

New-NotionRichText [[-Type] <String>] [[-Annotations] <Object>] [[-MarkdownText] <String>] [[-Link] <Object>]
 [<CommonParameters>]

DESCRIPTION

This function creates a new instance of the rich_text class. You can create an empty rich text block, provide text content, or provide text content with annotations and a link.

EXAMPLES

EXAMPLE 1

New-NotionRichText

Creates an empty rich text object.

EXAMPLE 2

New-NotionRichText -Text "Hello World"

Creates a rich text object with the specified text "Hello World".

EXAMPLE 3

$annotations = New-NotionRichTextAnnotation -Bold -Color "blue"
New-NotionRichText -Text "Hello World" -Annotations $annotations -Link "https://example.com"

Creates a rich text object with the specified text, annotations, and link.

PARAMETERS

-Annotations

The annotations (bold, italic, etc.) for the rich text block. If not specified, the properties of the parent object are used.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Link

The link object or URL for the rich text block.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MarkdownText

{{ Fill MarkdownText Description }}

Type: String
Parameter Sets: ConvertFromMarkdown
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Text

The text content for the rich text block.

Type: String
Parameter Sets: Text
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type

{{ Fill Type Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: Text
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

[rich_text]

NOTES

RELATED LINKS

⚠️ **GitHub.com Fallback** ⚠️