Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Select
Custom Inputs
Components
Navigation
Components
69
Micro Charts
Libraries
Kanban Board
Image Designer
Video Player
Visual Builder
Content Editor
Data View
Latest npm version of @ngstarter-ui/componentsWeekly npm downloads of @ngstarter-ui/components
Purchase

Comment Editor

Comment Editor is a simplified text editor for quick messages, comments, threads, and replies. Use it when users need to compose a short or medium response and send it immediately. It can include lightweight formatting, links, lists, images, and media when the comment flow needs them.

Use it for:
  • Writing comments in tasks, projects, activity feeds, reviews, and support threads.
  • Replying to a conversation with a compact compose box.
  • Sending message HTML through the sent event.
  • Adding a small toolbar, footer actions, cancel behavior, or image upload to a comment composer.

Do not use Comment Editor for long-form documents, CMS pages, complex content editing, markdown editing, code editing, search, or display-only comments. Use Content Editor or Text Editor when users need a fuller editing surface.

ngs-comment-editor - the main component for the rich text editor.

PropTypeDefault
contentMaxHeight
Maximum height of the content area in pixels.
number
buttonCancelLabel
Label for the cancel button.
stringCancel
buttonSendLabel
Label for the send button.
stringSend
placeholder
Placeholder text for the editor.
stringWrite something …
toolbarAlwaysVisible
Whether the toolbar should always be visible.
booleanfalse
fullViewMode
Whether the editor should be in full view mode by default.
booleanfalse
cancelButtonAlwaysVisible
Whether the cancel button should always be visible.
booleanfalse
imageUploadFn
Function to handle image uploads.
(file: Blob) => Promise<string>
EventDescription
sentEvent emitted when the send button is clicked. Emits the HTML content.
canceledEvent emitted when the cancel button is clicked.

ngs-comment-editor-toolbar component - adds a toolbar to the editor.

ngs-comment-editor-footer-bar component - adds a footer bar with buttons.

ngs-comment-editor-divider component - adds a divider between editor sections.

ngs-comment-editor-bubble-menu component - adds a bubble menu for text selection.

Various ngsCommentEditorCommand* directives are available to bind editor actions to buttons (e.g., ngsCommentEditorCommandBold).