🚨 Announcing Vendure v2 Beta

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, viewContainerRef: ViewContainerRef, contextMenuService: ContextMenuService)
  menuElement: HTMLDivElement | null
  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, viewContainerRef: ViewContainerRef, contextMenuService: ContextMenuService) => RichTextEditorComponent
property
type:
HTMLDivElement | null

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) =>