Skip to content

Latest commit

 

History

History
228 lines (147 loc) · 6.65 KB

_parsetextstyle_.md

File metadata and controls

228 lines (147 loc) · 6.65 KB

Module: "parseTextStyle"

Index

Functions

Functions

applyTextStyleToTextNode

applyTextStyleToTextNode(textStyle: LetterStyle[], textNode?: TextNode, isLoadFonts: boolean): Promise‹TextNode›

Defined in parseTextStyle.ts:233

Parameters:

Name Type Default
textStyle LetterStyle[] -
textNode? TextNode -
isLoadFonts boolean true

Returns: Promise‹TextNode›


changeCharactersTextStyle

changeCharactersTextStyle(textStyle: LetterStyle[], characters: string): any[]

Defined in parseTextStyle.ts:286

Parameters:

Name Type
textStyle LetterStyle[]
characters string

Returns: any[]


changeTextStyle

changeTextStyle(textStyle: LetterStyle[], styleName: "fontSize", newValue: number, beforeValue?: number): any

Defined in parseTextStyle.ts:317

Parameters:

Name Type
textStyle LetterStyle[]
styleName "fontSize"
newValue number
beforeValue? number

Returns: any

changeTextStyle(textStyle: LetterStyle[], styleName: "fontName", newValue: FontName, beforeValue?: FontName): any

Defined in parseTextStyle.ts:323

Parameters:

Name Type
textStyle LetterStyle[]
styleName "fontName"
newValue FontName
beforeValue? FontName

Returns: any

changeTextStyle(textStyle: LetterStyle[], styleName: "textCase", newValue: TextCase, beforeValue?: TextCase): any

Defined in parseTextStyle.ts:329

Parameters:

Name Type
textStyle LetterStyle[]
styleName "textCase"
newValue TextCase
beforeValue? TextCase

Returns: any

changeTextStyle(textStyle: LetterStyle[], styleName: "textDecoration", newValue: TextDecoration, beforeValue?: TextDecoration): any

Defined in parseTextStyle.ts:335

Parameters:

Name Type
textStyle LetterStyle[]
styleName "textDecoration"
newValue TextDecoration
beforeValue? TextDecoration

Returns: any

changeTextStyle(textStyle: LetterStyle[], styleName: "letterSpacing", newValue: LetterSpacing, beforeValue?: LetterSpacing): any

Defined in parseTextStyle.ts:341

Parameters:

Name Type
textStyle LetterStyle[]
styleName "letterSpacing"
newValue LetterSpacing
beforeValue? LetterSpacing

Returns: any

changeTextStyle(textStyle: LetterStyle[], styleName: "lineHeight", newValue: LineHeight, beforeValue?: LineHeight): any

Defined in parseTextStyle.ts:347

Parameters:

Name Type
textStyle LetterStyle[]
styleName "lineHeight"
newValue LineHeight
beforeValue? LineHeight

Returns: any

changeTextStyle(textStyle: LetterStyle[], styleName: "fills", newValue: Paint[], beforeValue?: Paint[]): any

Defined in parseTextStyle.ts:353

Parameters:

Name Type
textStyle LetterStyle[]
styleName "fills"
newValue Paint[]
beforeValue? Paint[]

Returns: any

changeTextStyle(textStyle: LetterStyle[], styleName: "textStyleId" | "fillStyleId", newValue: string, beforeValue?: string): any

Defined in parseTextStyle.ts:359

Parameters:

Name Type
textStyle LetterStyle[]
styleName "textStyleId" | "fillStyleId"
newValue string
beforeValue? string

Returns: any


joinTextLinesStyles

joinTextLinesStyles(textStyle: LineStyle[], addNewlineCharacters: boolean | " " | "
"): any

Defined in parseTextStyle.ts:186

Parameters:

Name Type Default
textStyle LineStyle[] -
addNewlineCharacters boolean | "
" | "
" false

Returns: any


parseTextStyle

parseTextStyle(node: TextNode, start: number, end?: number, styleName?: FontStyleNames[]): LetterStyle[]

Defined in parseTextStyle.ts:36

Parameters:

Name Type Default
node TextNode -
start number 0
end? number -
styleName? FontStyleNames[] -

Returns: LetterStyle[]


splitTextStyleIntoLines

splitTextStyleIntoLines(textStyle: LetterStyle[], removeNewlineCharacters: boolean, removeEmptylines: boolean): any[]

Defined in parseTextStyle.ts:99

Parameters:

Name Type Default
textStyle LetterStyle[] -
removeNewlineCharacters boolean false
removeEmptylines boolean false

Returns: any[]