Skip to content
Last updated

API / geotoolkit / report / edit / properties / TextStyleProperties / TextStyleProperties

Class: TextStyleProperties

properties.TextStyleProperties.TextStyleProperties

Define text properties implementation for DOM Element

Implements

Table of contents

Constructors
  • [new TextStyleProperties(domElement)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.report.edit.properties.textstyleproperties.textstyleproperties.md#new textstyleproperties(domelement))
Methods

Contents

Constructors

new TextStyleProperties(domElement)

• new TextStyleProperties(domElement?)

Parameters

Name Type Description
Optional domElementAbstractElementDOM element
Methods

clearTextFormatting

▸ clearTextFormatting(): TextStyleProperties

Clear custom text style (restore to default Report Settings)

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.clearTextFormatting


getBackgroundColor

▸ getBackgroundColor(): string | RgbaColor

Returns element background color

Returns

string | RgbaColor

return element background color

Implementation of

ITextStyleProperties.getBackgroundColor


getColor

▸ getColor(): string | RgbaColor

Returns text style color

Returns

string | RgbaColor

return text color

Implementation of

ITextStyleProperties.getColor


getFontFamily

▸ getFontFamily(): string

Return font family

Returns

string

return font family

Implementation of

ITextStyleProperties.getFontFamily


getHighlightColor

▸ getHighlightColor(): string | RgbaColor

Returns text highlight color

Returns

string | RgbaColor

return text highlight color

Implementation of

ITextStyleProperties.getHighlightColor


getTextAlignment

▸ getTextAlignment(): string

Returns text alignment

Returns

string

return text alignment

Implementation of

ITextStyleProperties.getTextAlignment


getTextSize

▸ getTextSize(): string | number

Return text size

Returns

string | number

return text size

Implementation of

ITextStyleProperties.getTextSize


getTextStyle

▸ getTextStyle(): TextStyle

Return text style

Returns

TextStyle

return text style

Implementation of

ITextStyleProperties.getTextStyle


hasCustomTextFormatting

▸ hasCustomTextFormatting(): boolean

Return true if text has custom text style declared in attribute

Returns

boolean

return true if text has custom format declared in attribute

Implementation of

ITextStyleProperties.hasCustomTextFormatting


isBold

▸ isBold(): boolean

Return true if text style is bold

Returns

boolean

return true if text style is bold

Implementation of

ITextStyleProperties.isBold


isItalic

▸ isItalic(): boolean

Return true if text style is italic

Returns

boolean

return true if text style is italic

Implementation of

ITextStyleProperties.isItalic


isStrikethrough

▸ isStrikethrough(): boolean

Return true if text has strikethrough style

Returns

boolean

return true if text has underline style

Implementation of

ITextStyleProperties.isStrikethrough


isUnderline

▸ isUnderline(): boolean

Return true if text has underline style

Returns

boolean

return true if text has underline style

Implementation of

ITextStyleProperties.isUnderline


setBackgroundColor

▸ setBackgroundColor(color): TextStyleProperties

Set element background color

Parameters

Name Type Description
colorstringelement background color

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.setBackgroundColor


setColor

▸ setColor(color): TextStyleProperties

Set text style color

Parameters

Name Type Description
colorstringtext style color

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.setColor


setDomElements

▸ setDomElements(domElements): TextStyleProperties

Set Array of DOM Elements

Parameters

Name Type Description
domElementsAbstractElement[]DOM Elements

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.setDomElements


setFontFamily

▸ setFontFamily(fontFamily): TextStyleProperties

Set font family

Parameters

Name Type Description
fontFamilystringfont family

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.setFontFamily


setHighlightColor

▸ setHighlightColor(color): TextStyleProperties

Set text highlight color

Parameters

Name Type Description
colorstringtext highlight color

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.setHighlightColor


setOnCreateState

▸ setOnCreateState(callBack): TextStyleProperties

Set Undo/Redo create state delegate

Parameters

Name Type Description
callBack(documentElement: Element | Element[], fullState: boolean) => IStatecreate undo/redo state delegate

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.setOnCreateState


setTextAlignment

▸ setTextAlignment(alignment): TextStyleProperties

Set text alignment

Parameters

Name Type Description
alignmentstringtext alignment

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.setTextAlignment


setTextSize

▸ setTextSize(textSize): TextStyleProperties

Set text size

Parameters

Name Type Description
textSizestring | numbertext size

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.setTextSize


setTextStyle

▸ setTextStyle(textStyle): TextStyleProperties

Set text style

Parameters

Name Type Description
textStyleTextStylePropertiestext style

Returns

TextStyleProperties

this

Implementation of

ITextStyleProperties.setTextStyle


toggleBold

▸ toggleBold(): TextStyleProperties

Change bold style

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.toggleBold


toggleItalic

▸ toggleItalic(): TextStyleProperties

Change italic style

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.toggleItalic


toggleStrikethrough

▸ toggleStrikethrough(): TextStyleProperties

Change underline style

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.toggleStrikethrough


toggleUnderline

▸ toggleUnderline(): TextStyleProperties

Change underline style

Returns

TextStyleProperties

Implementation of

ITextStyleProperties.toggleUnderline