@skyux/text-editor 10.2.0 → 10.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ import { SkyInputBoxModule, SkyCheckboxModule, SkyInputBoxHostService, SKY_FORM_
9
9
  import * as i1$2 from '@angular/forms';
10
10
  import { FormsModule, NgControl } from '@angular/forms';
11
11
  import * as i3 from '@skyux/core';
12
- import { SkyIdModule, SkyCoreAdapterService, SkyIdService } from '@skyux/core';
12
+ import { SkyFormsUtility, SkyIdModule, SkyCoreAdapterService, SkyIdService } from '@skyux/core';
13
13
  import * as i2$1 from '@skyux/layout';
14
14
  import { SkyToolbarModule } from '@skyux/layout';
15
15
  import { take, Subject } from 'rxjs';
@@ -118,16 +118,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
118
118
  }]
119
119
  }] });
120
120
 
121
- // Need to add the following to classes which contain static methods.
122
- // See: https://github.com/ng-packagr/ng-packagr/issues/641
123
- // @dynamic
124
- class SkyFormsUtility {
125
- /** Coerces a data-bound value (typically a string) to a boolean. */
126
- static coerceBooleanProperty(value) {
127
- return value !== undefined && `${value}` !== 'false';
128
- }
129
- }
130
-
131
121
  /* istanbul ignore file */
132
122
  /**
133
123
  * NOTICE: DO NOT MODIFY THIS FILE!
@@ -677,10 +667,30 @@ class SkyTextEditorAdapterService {
677
667
  selectElement(element) {
678
668
  this.#selectionService.selectElement(this.#getIframeDocumentEl(), this.#getContentWindowEl(), element);
679
669
  }
670
+ setErrorAttributes(errorId, errors) {
671
+ const documentEl = this.#getIframeDocumentEl();
672
+ documentEl.body.setAttribute('aria-invalid', (!!errors).toString());
673
+ if (errors && errorId) {
674
+ documentEl.body.setAttribute('aria-errormessage', errorId);
675
+ }
676
+ else {
677
+ documentEl.body.removeAttribute('aria-errormessage');
678
+ }
679
+ }
680
+ setLabelAttribute(label) {
681
+ if (label) {
682
+ const documentEl = this.#getIframeDocumentEl();
683
+ documentEl.body.setAttribute('aria-label', label);
684
+ }
685
+ }
680
686
  setPlaceholder(placeholder) {
681
687
  const documentEl = this.#getIframeDocumentEl();
682
688
  documentEl.body.setAttribute('data-placeholder', placeholder || '');
683
689
  }
690
+ setRequiredAttribute(required) {
691
+ const documentEl = this.#getIframeDocumentEl();
692
+ documentEl.body.setAttribute('aria-required', required.toString());
693
+ }
684
694
  setFontSize(fontSize) {
685
695
  const doc = this.#getIframeDocumentEl();
686
696
  this.execCommand({ command: 'fontSize', value: '1' });
@@ -1526,6 +1536,17 @@ class SkyTextEditorComponent {
1526
1536
  get initialStyleState() {
1527
1537
  return this.#_initialStyleState;
1528
1538
  }
1539
+ /**
1540
+ * The text to display as the text editor's label.
1541
+ * @preview
1542
+ */
1543
+ set labelText(value) {
1544
+ this.#_labelText = value;
1545
+ this.#updateA11yAttributes();
1546
+ }
1547
+ get labelText() {
1548
+ return this.#_labelText;
1549
+ }
1529
1550
  /**
1530
1551
  * The menus to include in the menu bar.
1531
1552
  * @default [ 'edit', 'format' ]
@@ -1624,6 +1645,7 @@ class SkyTextEditorComponent {
1624
1645
  #ngUnsubscribe;
1625
1646
  #_fontList;
1626
1647
  #_fontSizeList;
1648
+ #_labelText;
1627
1649
  #_mergeFields;
1628
1650
  #_menus;
1629
1651
  #_toolbarActions;
@@ -1745,6 +1767,11 @@ class SkyTextEditorComponent {
1745
1767
  }
1746
1768
  #initIframe() {
1747
1769
  this.#adapterService.initEditor(this.id, this.iframeRef.nativeElement, this.initialStyleState, this.placeholder);
1770
+ this.ngControl.statusChanges
1771
+ ?.pipe(takeUntil(this.#ngUnsubscribe))
1772
+ .subscribe(() => {
1773
+ this.#updateA11yAttributes();
1774
+ });
1748
1775
  this.#editorService
1749
1776
  .inputListener()
1750
1777
  .pipe(takeUntil(this.#ngUnsubscribe))
@@ -1799,6 +1826,7 @@ class SkyTextEditorComponent {
1799
1826
  });
1800
1827
  });
1801
1828
  this.#adapterService.setEditorInnerHtml(this.#_value);
1829
+ this.#updateA11yAttributes();
1802
1830
  /* istanbul ignore next */
1803
1831
  if (this.autofocus) {
1804
1832
  this.#adapterService.focusEditor();
@@ -1807,6 +1835,13 @@ class SkyTextEditorComponent {
1807
1835
  this.#focusInitialized = false;
1808
1836
  this.#checkAutofocusAndFocus();
1809
1837
  }
1838
+ #updateA11yAttributes() {
1839
+ if (this.#editorService.isInitialized) {
1840
+ this.#adapterService.setLabelAttribute(this.labelText);
1841
+ this.#adapterService.setErrorAttributes(this.labelText ? this.errorId : '', this.ngControl.errors);
1842
+ this.#adapterService.setRequiredAttribute(SkyFormsUtility.hasRequiredValidation(this.ngControl));
1843
+ }
1844
+ }
1810
1845
  #viewToModelUpdate(emitChange = true) {
1811
1846
  this.value = this.#adapterService.getEditorInnerHtml();
1812
1847
  /* istanbul ignore else */
@@ -1824,7 +1859,7 @@ class SkyTextEditorComponent {
1824
1859
  SkyTextEditorSelectionService,
1825
1860
  SkyTextEditorAdapterService,
1826
1861
  { provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
1827
- ], viewQueries: [{ propertyName: "iframeRef", first: true, predicate: ["iframe"], descendants: true }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<div\n class=\"sky-text-editor\"\n [attr.aria-label]=\"labelText\"\n [attr.aria-invalid]=\"!!ngControl.errors\"\n [attr.aria-errormessage]=\"labelText && ngControl.errors ? errorId : undefined\"\n [ngClass]=\"{\n 'sky-text-editor-disabled': disabled,\n 'sky-text-editor-wrapper-focused': editorFocused,\n 'sky-text-editor-invalid': ngControl.errors\n }\"\n>\n <div class=\"sky-text-editor-label-wrapper\">\n <label *ngIf=\"labelText\" class=\"sky-control-label\">{{ labelText }}</label>\n </div>\n <sky-toolbar\n *ngIf=\"\n (menus && menus.length) > 0 ||\n (toolbarActions && toolbarActions.length > 0)\n \"\n class=\"sky-text-editor-toolbar\"\n >\n <sky-toolbar-section\n *ngIf=\"menus && menus.length > 0\"\n aria-label=\"Text formatting\"\n class=\"menubar\"\n role=\"toolbar\"\n >\n <sky-text-editor-menubar\n [disabled]=\"disabled\"\n [editorFocusStream]=\"editorFocusStream\"\n [menus]=\"menus\"\n [mergeFields]=\"mergeFields\"\n >\n </sky-text-editor-menubar>\n </sky-toolbar-section>\n <sky-toolbar-section\n *ngIf=\"toolbarActions && toolbarActions.length > 0\"\n aria-label=\"Text formatting\"\n class=\"toolbar\"\n role=\"toolbar\"\n >\n <sky-text-editor-toolbar\n [disabled]=\"disabled\"\n [editorFocusStream]=\"editorFocusStream\"\n [fontList]=\"fontList\"\n [fontSizeList]=\"fontSizeList\"\n [linkWindowOptions]=\"linkWindowOptions\"\n [toolbarActions]=\"toolbarActions\"\n [styleState]=\"initialStyleState\"\n >\n </sky-text-editor-toolbar>\n </sky-toolbar-section>\n </sky-toolbar>\n <iframe\n class=\"sky-text-editor-wrapper\"\n src=\"about:blank\"\n [attr.title]=\"\n labelText || ('skyux_text_editor_iframe_title_default' | skyLibResources)\n \"\n [ngClass]=\"{\n 'sky-text-editor-wrapper-disabled': disabled\n }\"\n (load)=\"onIframeLoad()\"\n #iframe\n allow=\"clipboard-read *; clipboard-write *\"\n >\n </iframe>\n</div>\n<sky-form-errors\n *ngIf=\"labelText && ngControl?.errors\"\n [id]=\"errorId\"\n [errors]=\"ngControl.errors\"\n [labelText]=\"labelText\"\n [showErrors]=\"ngControl.touched || ngControl.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [".sky-text-editor.sky-text-editor-disabled .sky-toolbar *,.sky-text-editor.sky-text-editor-disabled .sky-text-editor-wrapper *{color:var(--sky-text-color-deemphasized)!important}.sky-text-editor .sky-text-editor-label-wrapper{display:flex;width:100%}.sky-text-editor .sky-text-editor-wrapper{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;height:300px;padding:1rem;font-size:1.2rem;border:1px solid #cdcfd2;border-top:none;overflow-y:auto;outline:none}.sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:var(--sky-background-color-disabled)}.sky-text-editor.sky-text-editor-invalid .sky-text-editor-wrapper{box-shadow:0 0 8px #ef404499;border:1px solid var(--sky-highlight-color-danger);outline:none}.sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-wrapper{box-shadow:0 0 8px #00b4f199;border:1px solid var(--sky-highlight-color-info);outline:none}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-section{padding:10px 10px 0}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 10px 0}.sky-text-editor .sky-text-editor-toolbar .sky-dropdown-button{border:none}.sky-text-editor .sky-text-editor-toolbar sky-text-editor-menubar,.sky-text-editor .sky-text-editor-toolbar sky-text-editor-toolbar{display:flex;flex-wrap:wrap}.sky-theme-modern .sky-text-editor{border:none;box-shadow:inset 0 0 0 1px #d2d2d2;border-radius:6px}.sky-theme-modern .sky-text-editor.sky-text-editor-disabled{background-color:var(--sky-background-color-disabled);cursor:not-allowed}.sky-theme-modern .sky-text-editor .sky-text-editor-label-wrapper:not(:empty){display:flex;padding:10px 10px 0;width:100%;color:#686c73;transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-text-editor .sky-text-editor-label-wrapper:not(:empty) label{font-size:13px;margin-bottom:0}.sky-theme-modern .sky-text-editor.sky-text-editor-invalid .sky-text-editor-label-wrapper{color:var(--sky-highlight-color-danger)}.sky-theme-modern .sky-text-editor.sky-text-editor-invalid .sky-text-editor-wrapper{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger)}.sky-theme-modern .sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-label-wrapper{color:#1870b8}.sky-theme-modern .sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-wrapper{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-text-editor:not(.sky-text-editor-wrapper-focused) .sky-text-editor-wrapper:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-text-editor .sky-text-editor-wrapper{transition:border-color .15s,box-shadow .15s,color .15s;box-shadow:inset 0 0 0 1px #d2d2d2;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border:none}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar{padding:10px 10px 0}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-section{padding:10px!important;border-top:none!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar sky-toolbar-section:not(:last-of-type) .sky-toolbar-section{padding-bottom:0!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-left:none!important;border-right:none!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 0 0!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyTextEditorMenubarComponent, selector: "sky-text-editor-menubar", inputs: ["editorFocusStream", "menus", "mergeFields", "disabled"] }, { kind: "component", type: SkyTextEditorToolbarComponent, selector: "sky-text-editor-toolbar", inputs: ["editorFocusStream", "fontList", "fontSizeList", "toolbarActions", "linkWindowOptions", "styleState", "disabled"] }, { kind: "ngmodule", type: SkyToolbarModule }, { kind: "component", type: i2$1.λ37, selector: "sky-toolbar", inputs: ["listDescriptor"] }, { kind: "component", type: i2$1.λ38, selector: "sky-toolbar-section" }, { kind: "ngmodule", type: SkyFormErrorsModule }, { kind: "component", type: i3$2.λ21, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "ngmodule", type: SkyTextEditorResourcesModule }, { kind: "pipe", type: i3$1.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1862
+ ], viewQueries: [{ propertyName: "iframeRef", first: true, predicate: ["iframe"], descendants: true }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<div\n class=\"sky-text-editor\"\n [ngClass]=\"{\n 'sky-text-editor-disabled': disabled,\n 'sky-text-editor-wrapper-focused': editorFocused,\n 'sky-text-editor-invalid': ngControl.errors\n }\"\n>\n <div class=\"sky-text-editor-label-wrapper\">\n <label *ngIf=\"labelText\" class=\"sky-control-label\">{{ labelText }}</label>\n </div>\n <sky-toolbar\n *ngIf=\"\n (menus && menus.length) > 0 ||\n (toolbarActions && toolbarActions.length > 0)\n \"\n class=\"sky-text-editor-toolbar\"\n >\n <sky-toolbar-section\n *ngIf=\"menus && menus.length > 0\"\n aria-label=\"Text formatting\"\n class=\"menubar\"\n role=\"toolbar\"\n >\n <sky-text-editor-menubar\n [disabled]=\"disabled\"\n [editorFocusStream]=\"editorFocusStream\"\n [menus]=\"menus\"\n [mergeFields]=\"mergeFields\"\n >\n </sky-text-editor-menubar>\n </sky-toolbar-section>\n <sky-toolbar-section\n *ngIf=\"toolbarActions && toolbarActions.length > 0\"\n aria-label=\"Text formatting\"\n class=\"toolbar\"\n role=\"toolbar\"\n >\n <sky-text-editor-toolbar\n [disabled]=\"disabled\"\n [editorFocusStream]=\"editorFocusStream\"\n [fontList]=\"fontList\"\n [fontSizeList]=\"fontSizeList\"\n [linkWindowOptions]=\"linkWindowOptions\"\n [toolbarActions]=\"toolbarActions\"\n [styleState]=\"initialStyleState\"\n >\n </sky-text-editor-toolbar>\n </sky-toolbar-section>\n </sky-toolbar>\n <iframe\n class=\"sky-text-editor-wrapper\"\n src=\"about:blank\"\n [attr.title]=\"\n labelText || ('skyux_text_editor_iframe_title_default' | skyLibResources)\n \"\n [ngClass]=\"{\n 'sky-text-editor-wrapper-disabled': disabled\n }\"\n (load)=\"onIframeLoad()\"\n #iframe\n allow=\"clipboard-read *; clipboard-write *\"\n >\n </iframe>\n</div>\n<sky-form-errors\n *ngIf=\"labelText && ngControl?.errors\"\n [id]=\"errorId\"\n [errors]=\"ngControl.errors\"\n [labelText]=\"labelText\"\n [showErrors]=\"ngControl.touched || ngControl.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [".sky-text-editor.sky-text-editor-disabled .sky-toolbar *,.sky-text-editor.sky-text-editor-disabled .sky-text-editor-wrapper *{color:var(--sky-text-color-deemphasized)!important}.sky-text-editor .sky-text-editor-label-wrapper{display:flex;width:100%}.sky-text-editor .sky-text-editor-wrapper{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;height:300px;padding:1rem;font-size:1.2rem;border:1px solid #cdcfd2;border-top:none;overflow-y:auto;outline:none}.sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:var(--sky-background-color-disabled)}.sky-text-editor.sky-text-editor-invalid .sky-text-editor-wrapper{box-shadow:0 0 8px #ef404499;border:1px solid var(--sky-highlight-color-danger);outline:none}.sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-wrapper{box-shadow:0 0 8px #00b4f199;border:1px solid var(--sky-highlight-color-info);outline:none}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-section{padding:10px 10px 0}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 10px 0}.sky-text-editor .sky-text-editor-toolbar .sky-dropdown-button{border:none}.sky-text-editor .sky-text-editor-toolbar sky-text-editor-menubar,.sky-text-editor .sky-text-editor-toolbar sky-text-editor-toolbar{display:flex;flex-wrap:wrap}.sky-theme-modern .sky-text-editor{border:none;box-shadow:inset 0 0 0 1px #d2d2d2;border-radius:6px}.sky-theme-modern .sky-text-editor.sky-text-editor-disabled{background-color:var(--sky-background-color-disabled);cursor:not-allowed}.sky-theme-modern .sky-text-editor .sky-text-editor-label-wrapper:not(:empty){display:flex;padding:10px 10px 0;width:100%;color:#686c73;transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-text-editor .sky-text-editor-label-wrapper:not(:empty) label{font-size:13px;margin-bottom:0}.sky-theme-modern .sky-text-editor.sky-text-editor-invalid .sky-text-editor-label-wrapper{color:var(--sky-highlight-color-danger)}.sky-theme-modern .sky-text-editor.sky-text-editor-invalid .sky-text-editor-wrapper{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger)}.sky-theme-modern .sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-label-wrapper{color:#1870b8}.sky-theme-modern .sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-wrapper{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-text-editor:not(.sky-text-editor-wrapper-focused) .sky-text-editor-wrapper:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-text-editor .sky-text-editor-wrapper{transition:border-color .15s,box-shadow .15s,color .15s;box-shadow:inset 0 0 0 1px #d2d2d2;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border:none}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar{padding:10px 10px 0}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-section{padding:10px!important;border-top:none!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar sky-toolbar-section:not(:last-of-type) .sky-toolbar-section{padding-bottom:0!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-left:none!important;border-right:none!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 0 0!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyTextEditorMenubarComponent, selector: "sky-text-editor-menubar", inputs: ["editorFocusStream", "menus", "mergeFields", "disabled"] }, { kind: "component", type: SkyTextEditorToolbarComponent, selector: "sky-text-editor-toolbar", inputs: ["editorFocusStream", "fontList", "fontSizeList", "toolbarActions", "linkWindowOptions", "styleState", "disabled"] }, { kind: "ngmodule", type: SkyToolbarModule }, { kind: "component", type: i2$1.λ37, selector: "sky-toolbar", inputs: ["listDescriptor"] }, { kind: "component", type: i2$1.λ38, selector: "sky-toolbar-section" }, { kind: "ngmodule", type: SkyFormErrorsModule }, { kind: "component", type: i3$2.λ21, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "ngmodule", type: SkyTextEditorResourcesModule }, { kind: "pipe", type: i3$1.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1828
1863
  }
1829
1864
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: SkyTextEditorComponent, decorators: [{
1830
1865
  type: Component,
@@ -1840,7 +1875,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1840
1875
  SkyToolbarModule,
1841
1876
  SkyFormErrorsModule,
1842
1877
  SkyTextEditorResourcesModule,
1843
- ], template: "<div\n class=\"sky-text-editor\"\n [attr.aria-label]=\"labelText\"\n [attr.aria-invalid]=\"!!ngControl.errors\"\n [attr.aria-errormessage]=\"labelText && ngControl.errors ? errorId : undefined\"\n [ngClass]=\"{\n 'sky-text-editor-disabled': disabled,\n 'sky-text-editor-wrapper-focused': editorFocused,\n 'sky-text-editor-invalid': ngControl.errors\n }\"\n>\n <div class=\"sky-text-editor-label-wrapper\">\n <label *ngIf=\"labelText\" class=\"sky-control-label\">{{ labelText }}</label>\n </div>\n <sky-toolbar\n *ngIf=\"\n (menus && menus.length) > 0 ||\n (toolbarActions && toolbarActions.length > 0)\n \"\n class=\"sky-text-editor-toolbar\"\n >\n <sky-toolbar-section\n *ngIf=\"menus && menus.length > 0\"\n aria-label=\"Text formatting\"\n class=\"menubar\"\n role=\"toolbar\"\n >\n <sky-text-editor-menubar\n [disabled]=\"disabled\"\n [editorFocusStream]=\"editorFocusStream\"\n [menus]=\"menus\"\n [mergeFields]=\"mergeFields\"\n >\n </sky-text-editor-menubar>\n </sky-toolbar-section>\n <sky-toolbar-section\n *ngIf=\"toolbarActions && toolbarActions.length > 0\"\n aria-label=\"Text formatting\"\n class=\"toolbar\"\n role=\"toolbar\"\n >\n <sky-text-editor-toolbar\n [disabled]=\"disabled\"\n [editorFocusStream]=\"editorFocusStream\"\n [fontList]=\"fontList\"\n [fontSizeList]=\"fontSizeList\"\n [linkWindowOptions]=\"linkWindowOptions\"\n [toolbarActions]=\"toolbarActions\"\n [styleState]=\"initialStyleState\"\n >\n </sky-text-editor-toolbar>\n </sky-toolbar-section>\n </sky-toolbar>\n <iframe\n class=\"sky-text-editor-wrapper\"\n src=\"about:blank\"\n [attr.title]=\"\n labelText || ('skyux_text_editor_iframe_title_default' | skyLibResources)\n \"\n [ngClass]=\"{\n 'sky-text-editor-wrapper-disabled': disabled\n }\"\n (load)=\"onIframeLoad()\"\n #iframe\n allow=\"clipboard-read *; clipboard-write *\"\n >\n </iframe>\n</div>\n<sky-form-errors\n *ngIf=\"labelText && ngControl?.errors\"\n [id]=\"errorId\"\n [errors]=\"ngControl.errors\"\n [labelText]=\"labelText\"\n [showErrors]=\"ngControl.touched || ngControl.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [".sky-text-editor.sky-text-editor-disabled .sky-toolbar *,.sky-text-editor.sky-text-editor-disabled .sky-text-editor-wrapper *{color:var(--sky-text-color-deemphasized)!important}.sky-text-editor .sky-text-editor-label-wrapper{display:flex;width:100%}.sky-text-editor .sky-text-editor-wrapper{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;height:300px;padding:1rem;font-size:1.2rem;border:1px solid #cdcfd2;border-top:none;overflow-y:auto;outline:none}.sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:var(--sky-background-color-disabled)}.sky-text-editor.sky-text-editor-invalid .sky-text-editor-wrapper{box-shadow:0 0 8px #ef404499;border:1px solid var(--sky-highlight-color-danger);outline:none}.sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-wrapper{box-shadow:0 0 8px #00b4f199;border:1px solid var(--sky-highlight-color-info);outline:none}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-section{padding:10px 10px 0}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 10px 0}.sky-text-editor .sky-text-editor-toolbar .sky-dropdown-button{border:none}.sky-text-editor .sky-text-editor-toolbar sky-text-editor-menubar,.sky-text-editor .sky-text-editor-toolbar sky-text-editor-toolbar{display:flex;flex-wrap:wrap}.sky-theme-modern .sky-text-editor{border:none;box-shadow:inset 0 0 0 1px #d2d2d2;border-radius:6px}.sky-theme-modern .sky-text-editor.sky-text-editor-disabled{background-color:var(--sky-background-color-disabled);cursor:not-allowed}.sky-theme-modern .sky-text-editor .sky-text-editor-label-wrapper:not(:empty){display:flex;padding:10px 10px 0;width:100%;color:#686c73;transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-text-editor .sky-text-editor-label-wrapper:not(:empty) label{font-size:13px;margin-bottom:0}.sky-theme-modern .sky-text-editor.sky-text-editor-invalid .sky-text-editor-label-wrapper{color:var(--sky-highlight-color-danger)}.sky-theme-modern .sky-text-editor.sky-text-editor-invalid .sky-text-editor-wrapper{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger)}.sky-theme-modern .sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-label-wrapper{color:#1870b8}.sky-theme-modern .sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-wrapper{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-text-editor:not(.sky-text-editor-wrapper-focused) .sky-text-editor-wrapper:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-text-editor .sky-text-editor-wrapper{transition:border-color .15s,box-shadow .15s,color .15s;box-shadow:inset 0 0 0 1px #d2d2d2;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border:none}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar{padding:10px 10px 0}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-section{padding:10px!important;border-top:none!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar sky-toolbar-section:not(:last-of-type) .sky-toolbar-section{padding-bottom:0!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-left:none!important;border-right:none!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 0 0!important}\n"] }]
1878
+ ], template: "<div\n class=\"sky-text-editor\"\n [ngClass]=\"{\n 'sky-text-editor-disabled': disabled,\n 'sky-text-editor-wrapper-focused': editorFocused,\n 'sky-text-editor-invalid': ngControl.errors\n }\"\n>\n <div class=\"sky-text-editor-label-wrapper\">\n <label *ngIf=\"labelText\" class=\"sky-control-label\">{{ labelText }}</label>\n </div>\n <sky-toolbar\n *ngIf=\"\n (menus && menus.length) > 0 ||\n (toolbarActions && toolbarActions.length > 0)\n \"\n class=\"sky-text-editor-toolbar\"\n >\n <sky-toolbar-section\n *ngIf=\"menus && menus.length > 0\"\n aria-label=\"Text formatting\"\n class=\"menubar\"\n role=\"toolbar\"\n >\n <sky-text-editor-menubar\n [disabled]=\"disabled\"\n [editorFocusStream]=\"editorFocusStream\"\n [menus]=\"menus\"\n [mergeFields]=\"mergeFields\"\n >\n </sky-text-editor-menubar>\n </sky-toolbar-section>\n <sky-toolbar-section\n *ngIf=\"toolbarActions && toolbarActions.length > 0\"\n aria-label=\"Text formatting\"\n class=\"toolbar\"\n role=\"toolbar\"\n >\n <sky-text-editor-toolbar\n [disabled]=\"disabled\"\n [editorFocusStream]=\"editorFocusStream\"\n [fontList]=\"fontList\"\n [fontSizeList]=\"fontSizeList\"\n [linkWindowOptions]=\"linkWindowOptions\"\n [toolbarActions]=\"toolbarActions\"\n [styleState]=\"initialStyleState\"\n >\n </sky-text-editor-toolbar>\n </sky-toolbar-section>\n </sky-toolbar>\n <iframe\n class=\"sky-text-editor-wrapper\"\n src=\"about:blank\"\n [attr.title]=\"\n labelText || ('skyux_text_editor_iframe_title_default' | skyLibResources)\n \"\n [ngClass]=\"{\n 'sky-text-editor-wrapper-disabled': disabled\n }\"\n (load)=\"onIframeLoad()\"\n #iframe\n allow=\"clipboard-read *; clipboard-write *\"\n >\n </iframe>\n</div>\n<sky-form-errors\n *ngIf=\"labelText && ngControl?.errors\"\n [id]=\"errorId\"\n [errors]=\"ngControl.errors\"\n [labelText]=\"labelText\"\n [showErrors]=\"ngControl.touched || ngControl.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [".sky-text-editor.sky-text-editor-disabled .sky-toolbar *,.sky-text-editor.sky-text-editor-disabled .sky-text-editor-wrapper *{color:var(--sky-text-color-deemphasized)!important}.sky-text-editor .sky-text-editor-label-wrapper{display:flex;width:100%}.sky-text-editor .sky-text-editor-wrapper{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;height:300px;padding:1rem;font-size:1.2rem;border:1px solid #cdcfd2;border-top:none;overflow-y:auto;outline:none}.sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:var(--sky-background-color-disabled)}.sky-text-editor.sky-text-editor-invalid .sky-text-editor-wrapper{box-shadow:0 0 8px #ef404499;border:1px solid var(--sky-highlight-color-danger);outline:none}.sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-wrapper{box-shadow:0 0 8px #00b4f199;border:1px solid var(--sky-highlight-color-info);outline:none}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-section{padding:10px 10px 0}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}.sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 10px 0}.sky-text-editor .sky-text-editor-toolbar .sky-dropdown-button{border:none}.sky-text-editor .sky-text-editor-toolbar sky-text-editor-menubar,.sky-text-editor .sky-text-editor-toolbar sky-text-editor-toolbar{display:flex;flex-wrap:wrap}.sky-theme-modern .sky-text-editor{border:none;box-shadow:inset 0 0 0 1px #d2d2d2;border-radius:6px}.sky-theme-modern .sky-text-editor.sky-text-editor-disabled{background-color:var(--sky-background-color-disabled);cursor:not-allowed}.sky-theme-modern .sky-text-editor .sky-text-editor-label-wrapper:not(:empty){display:flex;padding:10px 10px 0;width:100%;color:#686c73;transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-text-editor .sky-text-editor-label-wrapper:not(:empty) label{font-size:13px;margin-bottom:0}.sky-theme-modern .sky-text-editor.sky-text-editor-invalid .sky-text-editor-label-wrapper{color:var(--sky-highlight-color-danger)}.sky-theme-modern .sky-text-editor.sky-text-editor-invalid .sky-text-editor-wrapper{border:none;box-shadow:inset 0 0 0 2px var(--sky-highlight-color-danger)}.sky-theme-modern .sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-label-wrapper{color:#1870b8}.sky-theme-modern .sky-text-editor.sky-text-editor-wrapper-focused .sky-text-editor-wrapper{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-text-editor:not(.sky-text-editor-wrapper-focused) .sky-text-editor-wrapper:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-text-editor .sky-text-editor-wrapper{transition:border-color .15s,box-shadow .15s,color .15s;box-shadow:inset 0 0 0 1px #d2d2d2;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border:none}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar{padding:10px 10px 0}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-section{padding:10px!important;border-top:none!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar sky-toolbar-section:not(:last-of-type) .sky-toolbar-section{padding-bottom:0!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-left:none!important;border-right:none!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 0 0!important}\n"] }]
1844
1879
  }], ctorParameters: () => [], propDecorators: { autofocus: [{
1845
1880
  type: Input
1846
1881
  }], disabled: [{