editor | NgsHeadlessEditor | scoped instance | Signal-based editor service owned by this Comment Editor. |
api | CommentEditorAPI | scoped facade | Stable facade used by command directives and application code. |
isEditorActivated | Signal<boolean> | computed | Whether the expanded editor layout is active. |
isToolbarVisible | Signal<boolean> | computed | Whether the projected toolbar is currently rendered. |
isBubbleMenuVisible | Signal<boolean> | computed | Whether a non-collapsed selection should show the projected bubble menu. |
isCancelVisible | Signal<boolean> | computed | Whether the cancel action is currently visible. |
sendDisabled | Signal<boolean> | computed | Combines disabled, loading, allow-empty, and editor-empty state. |
send(event?) / submit(event?) | void | — | Emits JSON and HTML outputs, then applies autoClear. |
cancel(event?) | void | — | Clears content, resets transient view state, and emits canceled. |
clear() | void | — | Resets the scoped editor to an empty paragraph. |
focus() | void | — | Focuses the editor surface and restores its model selection. |
showFullView() / hideFullView() | void | — | Controls transient expanded state. |
showToolbar() / hideToolbar() / toggleToolbar() | void | — | Controls the projected toolbar. |
insertText(text) | void | — | Programmatically inserts text at the selection; a standalone emoji receives the single-emoji mark. |
insertImage(file) | void | — | Creates an upload placeholder, invokes imageUploadFn, and replaces or annotates the media block. |
insertYoutube(url) | boolean | — | Validates a YouTube URL and inserts a privacy-enhanced embed block. |
setTextColor(color) / unsetTextColor() | boolean | — | Applies or removes the textColor mark for the current selection or caret. |
setBackgroundColor(color) / unsetBackgroundColor() | boolean | — | Applies or removes the backgroundColor highlight mark for the current selection or caret. |
setLink(url) / unsetLink() | boolean | — | Applies, edits, or removes the link mark for the current text selection. |