インポート
import { NuiEditor } from '@needless-ui/angular/editor';NuiEditor
リッチテキストエディター。
| 名前 | 型 | デフォルト | 説明 |
|---|---|---|---|
value双方向 | string | '' | 内容。HTML または Markdown で、テキストがないときは空です。 |
format入力 | 'html' | 'markdown' | 'html' | 値の書き方。 |
tools入力 | NuiEditorTool[] | NUI_EDITOR_TOOLS | ツールバーのボタン。順番に並べ、グループの間には | を入れます。 |
label, labelledBy, describedBy入力 | string | 内容に名前と説明を付けます。 | |
placeholder入力 | string | 空のときに表示するテキスト。 | |
readonly, disabled, invalid入力 | boolean | false | それぞれ、編集させずに内容を表示する、操作できなくする、無効としてマークする設定です。 |
labels入力 | Partial<NuiEditorLabels> | エディターが表示または読み上げるすべてのテキスト。翻訳に使います。 | |
runメソッド | (tool: NuiEditorTool) => void | ツールバーのコマンドを実行します。 | |
undo, redo, focusメソッド | () => void | それぞれ、取り消し、やり直し、テキストへのフォーカス移動を行います。 |
Helpers
ドキュメントを変換する関数。
| 名前 | 型 | デフォルト | 説明 |
|---|---|---|---|
nuiEditorToHtml, nuiEditorToMarkdownメソッド | (doc) => string | ドキュメントを HTML または Markdown として書き出します。 | |
nuiEditorFromHtml, nuiEditorFromMarkdownメソッド | (text, document?) => NuiEditorDoc | HTML または Markdown をドキュメントとして読み込みます。エディターが表示できるものだけを残します。 |