-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(components/text-editor): allow initializing as disabled (#3099)
[AB#3243272](https://dev.azure.com/blackbaud/f565481a-7bc9-4083-95d5-4f953da6d499/_workitems/edit/3243272)
- Loading branch information
1 parent
501b985
commit 794a6fc
Showing
4 changed files
with
143 additions
and
26 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...t-editor/src/lib/modules/text-editor/fixtures/text-editor-reactive.component.fixture.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div id="fixture-wrapper"> | ||
<sky-text-editor | ||
[autofocus]="autofocus" | ||
[fontList]="fontList" | ||
[fontSizeList]="fontSizeList" | ||
[formControl]="formControl" | ||
[helpKey]="helpKey" | ||
[helpPopoverContent]="helpPopoverContent" | ||
[helpPopoverTitle]="helpPopoverTitle" | ||
[hintText]="hintText" | ||
[id]="id" | ||
[initialStyleState]="initialStyleState" | ||
[labelText]="labelText" | ||
[linkWindowOptions]="linkWindowOptions" | ||
[menus]="menus" | ||
[mergeFields]="mergeFields" | ||
[placeholder]="placeholder" | ||
[stacked]="stacked" | ||
[toolbarActions]="toolbarActions" | ||
/> | ||
</div> |
72 changes: 72 additions & 0 deletions
72
...ext-editor/src/lib/modules/text-editor/fixtures/text-editor-reactive.component.fixture.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { Component } from '@angular/core'; | ||
import { FormControl, ReactiveFormsModule } from '@angular/forms'; | ||
import { SkyTextEditorModule } from '@skyux/text-editor'; | ||
|
||
import { FONT_LIST_DEFAULTS } from '../defaults/font-list-defaults'; | ||
import { FONT_SIZE_LIST_DEFAULTS } from '../defaults/font-size-list-defaults'; | ||
import { SkyTextEditorFont } from '../types/font-state'; | ||
import { SkyTextEditorLinkWindowOptionsType } from '../types/link-window-options-type'; | ||
import { SkyTextEditorMenuType } from '../types/menu-type'; | ||
import { SkyTextEditorStyleState } from '../types/style-state'; | ||
import { SkyTextEditorMergeField } from '../types/text-editor-merge-field'; | ||
import { SkyTextEditorToolbarActionType } from '../types/toolbar-action-type'; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
@Component({ | ||
selector: 'sky-text-editor-test-reactive', | ||
templateUrl: './text-editor-reactive.component.fixture.html', | ||
standalone: true, | ||
imports: [SkyTextEditorModule, ReactiveFormsModule], | ||
}) | ||
export class TextEditorReactiveFixtureComponent { | ||
public autofocus = false; | ||
public fontList: SkyTextEditorFont[] | undefined = FONT_LIST_DEFAULTS; | ||
public fontSizeList: number[] | undefined = FONT_SIZE_LIST_DEFAULTS; | ||
public formControl = new FormControl('<p>Some text</p>'); | ||
public helpKey: string | undefined; | ||
public helpPopoverContent: string | undefined; | ||
public helpPopoverTitle: string | undefined; | ||
public id: string | undefined = 'id-from-fixture'; | ||
public initialStyleState: SkyTextEditorStyleState = | ||
{} as SkyTextEditorStyleState; | ||
public menus: SkyTextEditorMenuType[] | undefined = [ | ||
'edit', | ||
'format', | ||
'merge-field', | ||
]; | ||
public mergeFields: SkyTextEditorMergeField[] | undefined = [ | ||
{ | ||
id: '0', | ||
name: 'Best field', | ||
}, | ||
{ | ||
id: '1', | ||
name: 'Second best field', | ||
}, | ||
{ | ||
id: '2', | ||
name: 'A field that is really too long for its own good', | ||
}, | ||
]; | ||
public placeholder: string | undefined; | ||
public toolbarActions: SkyTextEditorToolbarActionType[] | undefined = [ | ||
'font-family', | ||
'font-size', | ||
'color', | ||
'list', | ||
'font-style', | ||
'alignment', | ||
'indentation', | ||
'undo-redo', | ||
'link', | ||
]; | ||
public linkWindowOptions: SkyTextEditorLinkWindowOptionsType[] | undefined = [ | ||
'new', | ||
'existing', | ||
]; | ||
public labelText: string | undefined; | ||
public hintText: string | undefined; | ||
public stacked: boolean | undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters