@skyux/text-editor 7.11.1 → 7.13.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.
@@ -1,7 +1,7 @@
1
1
  import * as i3 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, Component, Input, NgModule, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
4
+ import { Injectable, Component, Input, NgModule, ChangeDetectionStrategy, ViewEncapsulation, ViewChild } from '@angular/core';
5
5
  import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
6
6
  import * as i1 from '@angular/platform-browser';
7
7
  import createDOMPurify from 'dompurify';
@@ -376,25 +376,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
376
376
  type: Injectable
377
377
  }] });
378
378
 
379
- var _SkyTextEditorService__editor;
379
+ var _SkyTextEditorService_editor;
380
380
  /**
381
381
  * @internal
382
382
  */
383
383
  class SkyTextEditorService {
384
384
  constructor() {
385
- _SkyTextEditorService__editor.set(this, void 0);
385
+ _SkyTextEditorService_editor.set(this, void 0);
386
386
  }
387
387
  /**
388
388
  * A dictionary representing all active text editors and their settings.
389
389
  */
390
390
  set editor(value) {
391
- __classPrivateFieldSet(this, _SkyTextEditorService__editor, value, "f");
391
+ __classPrivateFieldSet(this, _SkyTextEditorService_editor, value, "f");
392
392
  }
393
393
  get editor() {
394
- if (!__classPrivateFieldGet(this, _SkyTextEditorService__editor, "f")) {
394
+ if (!__classPrivateFieldGet(this, _SkyTextEditorService_editor, "f")) {
395
395
  throw new Error('Editor has not been initialized.');
396
396
  }
397
- return __classPrivateFieldGet(this, _SkyTextEditorService__editor, "f");
397
+ return __classPrivateFieldGet(this, _SkyTextEditorService_editor, "f");
398
+ }
399
+ get isInitialized() {
400
+ return __classPrivateFieldGet(this, _SkyTextEditorService_editor, "f") !== undefined;
398
401
  }
399
402
  /**
400
403
  * Returns the blur observable from the editor with the corresponding id.
@@ -427,7 +430,7 @@ class SkyTextEditorService {
427
430
  return this.editor.selectionChangeObservable;
428
431
  }
429
432
  }
430
- _SkyTextEditorService__editor = new WeakMap();
433
+ _SkyTextEditorService_editor = new WeakMap();
431
434
  SkyTextEditorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTextEditorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
432
435
  SkyTextEditorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTextEditorService });
433
436
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTextEditorService, decorators: [{
@@ -1395,7 +1398,6 @@ class SkyTextEditorComponent {
1395
1398
  * @default false
1396
1399
  */
1397
1400
  set disabled(value) {
1398
- var _a;
1399
1401
  const coercedValue = SkyFormsUtility.coerceBooleanProperty(value);
1400
1402
  if (coercedValue !== this.disabled) {
1401
1403
  __classPrivateFieldSet(this, _SkyTextEditorComponent__disabled, coercedValue, "f");
@@ -1403,15 +1405,15 @@ class SkyTextEditorComponent {
1403
1405
  let focusableChildren;
1404
1406
  /* istanbul ignore else */
1405
1407
  if (this.iframeRef) {
1406
- focusableChildren = __classPrivateFieldGet(this, _SkyTextEditorComponent_coreAdapterService, "f").getFocusableChildren((_a = this.iframeRef.contentDocument) === null || _a === void 0 ? void 0 : _a.body, {
1408
+ focusableChildren = __classPrivateFieldGet(this, _SkyTextEditorComponent_coreAdapterService, "f").getFocusableChildren(this.iframeRef.nativeElement.contentDocument.body, {
1407
1409
  ignoreVisibility: true,
1408
1410
  ignoreTabIndex: true,
1409
1411
  });
1410
1412
  if (__classPrivateFieldGet(this, _SkyTextEditorComponent__disabled, "f")) {
1411
- __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").disableEditor(focusableChildren, this.iframeRef);
1413
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").disableEditor(focusableChildren, this.iframeRef.nativeElement);
1412
1414
  }
1413
1415
  else {
1414
- __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").enableEditor(focusableChildren, this.iframeRef);
1416
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").enableEditor(focusableChildren, this.iframeRef.nativeElement);
1415
1417
  }
1416
1418
  __classPrivateFieldGet(this, _SkyTextEditorComponent_changeDetector, "f").markForCheck();
1417
1419
  }
@@ -1551,14 +1553,19 @@ class SkyTextEditorComponent {
1551
1553
  get value() {
1552
1554
  return __classPrivateFieldGet(this, _SkyTextEditorComponent__value, "f");
1553
1555
  }
1556
+ ngAfterViewInit() {
1557
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_initIframe).call(this);
1558
+ }
1554
1559
  ngOnDestroy() {
1555
1560
  __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").removeObservers(__classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f").editor);
1556
1561
  __classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f").next();
1557
1562
  __classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f").complete();
1558
1563
  }
1559
- onIframeLoad(event) {
1560
- this.iframeRef = event.target;
1561
- __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_initIframe).call(this);
1564
+ onIframeLoad() {
1565
+ // Reinitialize the editor if it already exists to cover situations where the text editor might have been moved in the DOM.
1566
+ if (__classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f").isInitialized) {
1567
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_initIframe).call(this);
1568
+ }
1562
1569
  }
1563
1570
  /**
1564
1571
  * Implemented as part of ControlValueAccessor.
@@ -1596,55 +1603,53 @@ class SkyTextEditorComponent {
1596
1603
  _SkyTextEditorComponent_defaultId = new WeakMap(), _SkyTextEditorComponent_id = new WeakMap(), _SkyTextEditorComponent_focusInitialized = new WeakMap(), _SkyTextEditorComponent_initialized = new WeakMap(), _SkyTextEditorComponent_ngUnsubscribe = new WeakMap(), _SkyTextEditorComponent_changeDetector = new WeakMap(), _SkyTextEditorComponent_coreAdapterService = new WeakMap(), _SkyTextEditorComponent_adapterService = new WeakMap(), _SkyTextEditorComponent_editorService = new WeakMap(), _SkyTextEditorComponent_sanitizationService = new WeakMap(), _SkyTextEditorComponent_ngControl = new WeakMap(), _SkyTextEditorComponent_zone = new WeakMap(), _SkyTextEditorComponent__fontList = new WeakMap(), _SkyTextEditorComponent__fontSizeList = new WeakMap(), _SkyTextEditorComponent__mergeFields = new WeakMap(), _SkyTextEditorComponent__menus = new WeakMap(), _SkyTextEditorComponent__toolbarActions = new WeakMap(), _SkyTextEditorComponent__disabled = new WeakMap(), _SkyTextEditorComponent__initialStyleState = new WeakMap(), _SkyTextEditorComponent__placeholder = new WeakMap(), _SkyTextEditorComponent__value = new WeakMap(), _SkyTextEditorComponent__onTouched = new WeakMap(), _SkyTextEditorComponent__onChange = new WeakMap(), _SkyTextEditorComponent_instances = new WeakSet(), _SkyTextEditorComponent_updateStyle = function _SkyTextEditorComponent_updateStyle() {
1597
1604
  __classPrivateFieldSet(this, _SkyTextEditorComponent__initialStyleState, Object.assign(Object.assign({}, __classPrivateFieldGet(this, _SkyTextEditorComponent__initialStyleState, "f")), __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").getStyleState()), "f");
1598
1605
  }, _SkyTextEditorComponent_initIframe = function _SkyTextEditorComponent_initIframe() {
1599
- if (this.iframeRef) {
1600
- __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").initEditor(this.id, this.iframeRef, this.initialStyleState, this.placeholder);
1601
- __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1602
- .inputListener()
1603
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1604
- .subscribe(() => {
1605
- // Angular doesn't run change detection for changes originating inside an iframe,
1606
- // so we have to call the onChange() event inside NgZone to force change propagation to consuming components.
1607
- __classPrivateFieldGet(this, _SkyTextEditorComponent_zone, "f").run(() => {
1608
- __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_viewToModelUpdate).call(this);
1609
- });
1610
- });
1611
- __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1612
- .selectionChangeListener()
1613
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1614
- .subscribe(() => {
1615
- __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_updateStyle).call(this);
1616
- this.editorFocusStream.next();
1617
- });
1618
- __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1619
- .clickListener()
1620
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1621
- .subscribe(() => {
1622
- this.editorFocusStream.next();
1623
- });
1624
- __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1625
- .blurListener()
1626
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1627
- .subscribe(() => {
1628
- // Angular doesn't run change detection for changes originating inside an iframe,
1629
- // so we have to run #_onTouched() inside the NgZone to force change propagation to consuming components.
1630
- __classPrivateFieldGet(this, _SkyTextEditorComponent_zone, "f").run(() => {
1631
- __classPrivateFieldGet(this, _SkyTextEditorComponent__onTouched, "f").call(this);
1632
- });
1633
- });
1634
- __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1635
- .commandChangeListener()
1636
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1637
- .subscribe(() => {
1638
- __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_updateStyle).call(this);
1606
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").initEditor(this.id, this.iframeRef.nativeElement, this.initialStyleState, this.placeholder);
1607
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1608
+ .inputListener()
1609
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1610
+ .subscribe(() => {
1611
+ // Angular doesn't run change detection for changes originating inside an iframe,
1612
+ // so we have to call the onChange() event inside NgZone to force change propagation to consuming components.
1613
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_zone, "f").run(() => {
1639
1614
  __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_viewToModelUpdate).call(this);
1640
1615
  });
1641
- __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").setEditorInnerHtml(__classPrivateFieldGet(this, _SkyTextEditorComponent__value, "f"));
1642
- /* istanbul ignore next */
1643
- if (this.autofocus) {
1644
- __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").focusEditor();
1645
- }
1646
- __classPrivateFieldSet(this, _SkyTextEditorComponent_initialized, true, "f");
1616
+ });
1617
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1618
+ .selectionChangeListener()
1619
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1620
+ .subscribe(() => {
1621
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_updateStyle).call(this);
1622
+ this.editorFocusStream.next();
1623
+ });
1624
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1625
+ .clickListener()
1626
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1627
+ .subscribe(() => {
1628
+ this.editorFocusStream.next();
1629
+ });
1630
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1631
+ .blurListener()
1632
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1633
+ .subscribe(() => {
1634
+ // Angular doesn't run change detection for changes originating inside an iframe,
1635
+ // so we have to run markForCheck() inside the NgZone to force change propagation to consuming components.
1636
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_zone, "f").run(() => {
1637
+ __classPrivateFieldGet(this, _SkyTextEditorComponent__onTouched, "f").call(this);
1638
+ });
1639
+ });
1640
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_editorService, "f")
1641
+ .commandChangeListener()
1642
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTextEditorComponent_ngUnsubscribe, "f")))
1643
+ .subscribe(() => {
1644
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_updateStyle).call(this);
1645
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_instances, "m", _SkyTextEditorComponent_viewToModelUpdate).call(this);
1646
+ });
1647
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").setEditorInnerHtml(__classPrivateFieldGet(this, _SkyTextEditorComponent__value, "f"));
1648
+ /* istanbul ignore next */
1649
+ if (this.autofocus) {
1650
+ __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").focusEditor();
1647
1651
  }
1652
+ __classPrivateFieldSet(this, _SkyTextEditorComponent_initialized, true, "f");
1648
1653
  }, _SkyTextEditorComponent_viewToModelUpdate = function _SkyTextEditorComponent_viewToModelUpdate(emitChange = true) {
1649
1654
  this.value = __classPrivateFieldGet(this, _SkyTextEditorComponent_adapterService, "f").getEditorInnerHtml();
1650
1655
  /* istanbul ignore else */
@@ -1657,14 +1662,14 @@ SkyTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1657
1662
  SkyTextEditorService,
1658
1663
  SkyTextEditorSelectionService,
1659
1664
  SkyTextEditorAdapterService,
1660
- ], ngImport: i0, template: "<div class=\"sky-text-editor\">\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 [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 title=\"Text Editor\"\n [ngClass]=\"{\n 'sky-text-editor-wrapper-disabled': disabled\n }\"\n (load)=\"onIframeLoad($event)\"\n >\n </iframe>\n</div>\n", styles: [".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 #c0c0c0;overflow-y:auto;outline:none}.sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:#ededee}.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!important;border-right:1px solid #cdcfd2!important}.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 .sky-text-editor-wrapper{border:1px solid #d2d2d2}.sky-theme-modern .sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:#ececed}.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}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-top:1px solid #d2d2d2!important;border-left:1px solid #d2d2d2!important;border-right:1px solid #d2d2d2!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 0 0!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.λ37, selector: "sky-toolbar" }, { kind: "component", type: i7.λ38, selector: "sky-toolbar-section" }, { kind: "component", type: SkyTextEditorToolbarComponent, selector: "sky-text-editor-toolbar", inputs: ["editorFocusStream", "fontList", "fontSizeList", "toolbarActions", "styleState", "disabled"] }, { kind: "component", type: SkyTextEditorMenubarComponent, selector: "sky-text-editor-menubar", inputs: ["editorFocusStream", "menus", "mergeFields", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1665
+ ], viewQueries: [{ propertyName: "iframeRef", first: true, predicate: ["iframe"], descendants: true }], ngImport: i0, template: "<div class=\"sky-text-editor\">\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 [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 title=\"Text Editor\"\n [ngClass]=\"{\n 'sky-text-editor-wrapper-disabled': disabled\n }\"\n (load)=\"onIframeLoad()\"\n #iframe\n >\n </iframe>\n</div>\n", styles: [".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 #c0c0c0;overflow-y:auto;outline:none}.sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:#ededee}.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!important;border-right:1px solid #cdcfd2!important}.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 .sky-text-editor-wrapper{border:1px solid #d2d2d2}.sky-theme-modern .sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:#ececed}.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}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-top:1px solid #d2d2d2!important;border-left:1px solid #d2d2d2!important;border-right:1px solid #d2d2d2!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 0 0!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.λ37, selector: "sky-toolbar" }, { kind: "component", type: i7.λ38, selector: "sky-toolbar-section" }, { kind: "component", type: SkyTextEditorToolbarComponent, selector: "sky-text-editor-toolbar", inputs: ["editorFocusStream", "fontList", "fontSizeList", "toolbarActions", "styleState", "disabled"] }, { kind: "component", type: SkyTextEditorMenubarComponent, selector: "sky-text-editor-menubar", inputs: ["editorFocusStream", "menus", "mergeFields", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1661
1666
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTextEditorComponent, decorators: [{
1662
1667
  type: Component,
1663
1668
  args: [{ selector: 'sky-text-editor', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
1664
1669
  SkyTextEditorService,
1665
1670
  SkyTextEditorSelectionService,
1666
1671
  SkyTextEditorAdapterService,
1667
- ], template: "<div class=\"sky-text-editor\">\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 [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 title=\"Text Editor\"\n [ngClass]=\"{\n 'sky-text-editor-wrapper-disabled': disabled\n }\"\n (load)=\"onIframeLoad($event)\"\n >\n </iframe>\n</div>\n", styles: [".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 #c0c0c0;overflow-y:auto;outline:none}.sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:#ededee}.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!important;border-right:1px solid #cdcfd2!important}.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 .sky-text-editor-wrapper{border:1px solid #d2d2d2}.sky-theme-modern .sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:#ececed}.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}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-top:1px solid #d2d2d2!important;border-left:1px solid #d2d2d2!important;border-right:1px solid #d2d2d2!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 0 0!important}\n"] }]
1672
+ ], template: "<div class=\"sky-text-editor\">\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 [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 title=\"Text Editor\"\n [ngClass]=\"{\n 'sky-text-editor-wrapper-disabled': disabled\n }\"\n (load)=\"onIframeLoad()\"\n #iframe\n >\n </iframe>\n</div>\n", styles: [".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 #c0c0c0;overflow-y:auto;outline:none}.sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:#ededee}.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!important;border-right:1px solid #cdcfd2!important}.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 .sky-text-editor-wrapper{border:1px solid #d2d2d2}.sky-theme-modern .sky-text-editor .sky-text-editor-wrapper.sky-text-editor-wrapper-disabled{background-color:#ececed}.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}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-sectioned{border-top:1px solid #d2d2d2!important;border-left:1px solid #d2d2d2!important;border-right:1px solid #d2d2d2!important}.sky-theme-modern .sky-text-editor .sky-text-editor-toolbar .sky-toolbar-item{margin:0 20px 0 0!important}\n"] }]
1668
1673
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.SkyCoreAdapterService }, { type: SkyTextEditorAdapterService }, { type: SkyTextEditorService }, { type: SkyTextSanitizationService }, { type: i3$1.NgControl }, { type: i0.NgZone }, { type: i1$1.SkyIdService }]; }, propDecorators: { autofocus: [{
1669
1674
  type: Input
1670
1675
  }], disabled: [{
@@ -1685,6 +1690,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
1685
1690
  type: Input
1686
1691
  }], toolbarActions: [{
1687
1692
  type: Input
1693
+ }], iframeRef: [{
1694
+ type: ViewChild,
1695
+ args: ['iframe']
1688
1696
  }] } });
1689
1697
 
1690
1698
  class SkyTextEditorModule {