Import
import { NuiEditor } from '@needless-ui/angular/editor';NuiEditor
A rich text editor.
| Name | Type | Default | Description |
|---|---|---|---|
valueTwo-way | string | '' | The content, as HTML or Markdown; empty when there’s no text. |
formatInput | 'html' | 'markdown' | 'html' | How the value is written. |
toolsInput | NuiEditorTool[] | NUI_EDITOR_TOOLS | The toolbar’s buttons in order, | between groups. |
label, labelledBy, describedByInput | string | Name and describe the content. | |
placeholderInput | string | Shown while it’s empty. | |
readonly, disabled, invalidInput | boolean | false | Shows the content without editing; turns it off; marks it invalid. |
labelsInput | Partial<NuiEditorLabels> | Every text it says, to translate. | |
runMethod | (tool: NuiEditorTool) => void | Runs a toolbar command. | |
undo, redo, focusMethod | () => void | Undoes, redoes, and moves focus into the text. |
Helpers
Functions to convert documents.
| Name | Type | Default | Description |
|---|---|---|---|
nuiEditorToHtml, nuiEditorToMarkdownMethod | (doc) => string | Write a document as HTML or Markdown. | |
nuiEditorFromHtml, nuiEditorFromMarkdownMethod | (text, document?) => NuiEditorDoc | Read HTML or Markdown into a document, keeping what the editor can show. |