Skip to main content

RichTextEditorComponent

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

Example

HTML
<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

propertystring

_readonly

property

onChange

property(val: any) => void

onTouch

property() => void

constructor

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

ngAfterViewInit

method() =>

ngOnDestroy

method() =>

registerOnChange

method(fn: any) =>

registerOnTouched

method(fn: any) =>

setDisabledState

method(isDisabled: boolean) =>

writeValue

method(value: any) =>
Was this chapter helpful?
Report Issue
Edited Feb 3, 2026·Edit this page