File

projects/tl-elements/src/lib/tl-wysiwyg/tl-wysiwyg.component.ts

Extends

TamuAbstractBaseComponent

Metadata

Index

Properties
Inputs
HostBindings

Constructor

constructor(injector: Injector)
Parameters :
Name Type Optional
injector Injector No

Inputs

emitEvent
Type : string
Default value : ''
height
Type : string
Default value : '500'

Provide custom height.

initialValue
Type : string
Default value : ''
inheritFontStyle
Type : "true" | "false"

HostBindings

style.--tl-font-family-sans-serif
Type : string
Default value : 'var(--tl-default-font-family-sans-serif)'

Allows for the override of the --tl-font-family-sans-serif css variable.

style.--tl-font-size
Type : string
Default value : 'var(--tl-default-font-size)'

Allows for the override of the --tl-default-font-size css variable.

Properties

skin
Type : string
Default value : 'oxide'

Provide customization of WYSIWYG skin theme.

toolbar
Type : string
Default value : 'undo redo | bold italic removeformat | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media | help cancel save'

Provide customization of WYSIWYG toolbar buttons.

_fontFamily
Type : string
Default value : 'var(--tl-default-font-family-sans-serif)'
Decorators :
@HostBinding('style.--tl-font-family-sans-serif')

Allows for the override of the --tl-font-family-sans-serif css variable.

_fontSize
Type : string
Default value : 'var(--tl-default-font-size)'
Decorators :
@HostBinding('style.--tl-font-size')

Allows for the override of the --tl-default-font-size css variable.

import { Component, Injector, Input } from '@angular/core';
import { TamuAbstractBaseComponent } from '../shared/tl-abstract-base.component';

@Component({
  selector: 'tl-wysiwyg-component',
  templateUrl: './tl-wysiwyg.component.html',
  styleUrls: ['./tl-wysiwyg.component.scss']
})
export class TlWysiwygComponent extends TamuAbstractBaseComponent {

  @Input() initialValue = '';

  @Input() emitEvent = '';

  /** Provide customization of WYSIWYG skin theme. */
  skin = 'oxide';

  /** Provide customization of WYSIWYG toolbar buttons. */
  toolbar = 'undo redo | bold italic removeformat | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media | help cancel save';

  /** Provide custom height. */
  @Input() height = '500';

  // tslint:disable-next-line:unnecessary-constructor
  constructor(injector: Injector) {
    super(injector);
  }

}
<tl-wysiwyg-wrapper #animationRoot>
  <wvr-wysiwyg-component [skin]="skin" [initialValue]="initialValue" [emitSaveEvent]="emitEvent" [toolbar]="toolbar" [height]="height"></wvr-wysiwyg-component>
</tl-wysiwyg-wrapper>

./tl-wysiwyg.component.scss

@import "../shared/styles/tl-variables.scss";

:host {

  wvr-editor-component {
    font-family: var(--tl-font-family-sans-serif);
    ::ng-deep {
      .wvr-editor {
        font-family: var(--tl-font-family-sans-serif);
      }
    }
  }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""