Skip to content

Commit

Permalink
Merge pull request #26 from incident-io/ejs/add-identation-rich-text-…
Browse files Browse the repository at this point in the history
…list

Add indent property to a rich text list
  • Loading branch information
estephinson authored Jan 23, 2024
2 parents 678ba21 + 279c56f commit 132e468
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion block_rich_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,19 @@ type RichTextList struct {
Type RichTextElementType `json:"type"`
Style RichTextListStyle `json:"style"`
Elements []RichTextSection `json:"elements"`
Indent int `json:"indent"`
}

func (l RichTextList) RichTextElementType() RichTextElementType {
return l.Type
}

func NewRichTextList(style RichTextListStyle, elements ...RichTextSection) *RichTextList {
func NewRichTextList(style RichTextListStyle, indentation int, elements ...RichTextSection) *RichTextList {
return &RichTextList{
Type: RTEList,
Style: style,
Elements: elements,
Indent: indentation,
}
}

Expand Down

0 comments on commit 132e468

Please sign in to comment.