diff --git a/projects/common/models/elements/text/text.ts b/projects/common/models/elements/text/text.ts index 9b4bad4c8f1b503760cf382f424b2f57293f0d12..404a75f9224c750e6fcd21040918c006bfa08ba9 100644 --- a/projects/common/models/elements/text/text.ts +++ b/projects/common/models/elements/text/text.ts @@ -2,7 +2,7 @@ import { ElementFactory } from 'common/util/element.factory'; import { BasicStyles, PositionedUIElement, - PositionProperties, + PositionProperties, SchemerData, SchemerValue, UIElement } from 'common/models/elements/element'; import { Type } from '@angular/core'; @@ -33,6 +33,28 @@ export class TextElement extends UIElement implements PositionedUIElement { }; } + isHighlightable(): boolean { + return this.highlightableYellow || + this.highlightableTurquoise || + this.highlightableOrange; + } + + hasSchemerData(): boolean { + return this.isHighlightable(); + } + + getSchemerData(): SchemerData { + return { + id: this.id, + type: 'string', + format: 'coloredSelectionRange', + multiple: true, + nullable: false, + values: [], + valuesComplete: false + }; + } + getComponentFactory(): Type<ElementComponent> { return TextComponent; }