New: Headless Commerce with Remix! read more

RichTextEditorComponent

RichTextEditorComponent

A rich text (HTML) editor based on Prosemirror (https://prosemirror.net/)

Example

<vdr-rich-text-editor
    [(ngModel)]="description"
    label="Description"
></vdr-rich-text-editor>

Signature

class RichTextEditorComponent implements ControlValueAccessor, AfterViewInit, OnDestroy {
  @Input() label: string;
  @HostBinding('class.readonly')
    _readonly = false;
  onChange: (val: any) => void;
  onTouch: () => void;
  constructor(changeDetector: ChangeDetectorRef, prosemirrorService: ProsemirrorService)
  ngAfterViewInit() => ;
  ngOnDestroy() => ;
  registerOnChange(fn: any) => ;
  registerOnTouched(fn: any) => ;
  setDisabledState(isDisabled: boolean) => ;
  writeValue(value: any) => ;
}

Implements

  • ControlValueAccessor
  • AfterViewInit
  • OnDestroy

Members

label

property
type:
string

_readonly

property
type:

onChange

property
type:
(val: any) => void

onTouch

property
type:
() => void

constructor

method
type:
(changeDetector: ChangeDetectorRef, prosemirrorService: ProsemirrorService) => RichTextEditorComponent

ngAfterViewInit

method
type:
() =>

ngOnDestroy

method
type:
() =>

registerOnChange

method
type:
(fn: any) =>

registerOnTouched

method
type:
(fn: any) =>

setDisabledState

method
type:
(isDisabled: boolean) =>

writeValue

method
type:
(value: any) =>