Skip to main content

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

label

property
string

_readonly

property

onChange

property
(val: any) => void

onTouch

property
() => void

constructor

method
(changeDetector: ChangeDetectorRef, prosemirrorService: ProsemirrorService, viewContainerRef: ViewContainerRef, contextMenuService: ContextMenuService) => RichTextEditorComponent
property
HTMLDivElement | null

ngAfterViewInit

method
() =>

ngOnDestroy

method
() =>

registerOnChange

method
(fn: any) =>

registerOnTouched

method
(fn: any) =>

setDisabledState

method
(isDisabled: boolean) =>

writeValue

method
(value: any) =>