Markdown & Editor
GitHub-Flavored Markdown als Fließtext rendern und mit Toolbar, Live-Vorschau und geteilter Ansicht bearbeiten.
Verfügbar für
Angular: verfügbar Vue: verfügbar React: verfügbar React Native: noch nicht verfügbar
Verwendung
Planning sync with Ada Park and Leo Ruiz.
Cut the onboarding checklist to five steps
Ship it behind the
short-onboardingflagDraft the invite copy
Legal review by Friday
<div class="demo-stack" style="max-width: 680px; width: 100%">
<div soneField>
<label soneFieldLabel for="markdown-source">Markdown</label>
<textarea
#sourceInput
id="markdown-source"
rows="6"
[value]="note()"
(input)="note.set(sourceInput.value)"
></textarea>
</div>
<sone-markdown data-testid="markdown-reference-preview" [source]="note()" />
<sone-markdown-editor
ariaLabel="Meeting note"
placeholder="Write in markdown…"
[minRows]="5"
[(value)]="draft"
/>
</div>Import
import {
SoneFloatingDockDirective,
SoneMarkdownComponent,
SoneMarkdownEditorComponent,
SoneMarkdownEditorFooterDirective,
SoneMarkdownEditorToolsDirective,
SoneMarkdownPreviewDirective,
} from "@surface-one/angular/markdown";API-Referenz
SoneFloatingDockDirectiveDirektive
| Name | Typ | Standard |
|---|---|---|
soneFloatingDock | boolean | false |
floatingDockAnchorerforderlich | HTMLElement | — |
SoneMarkdownComponentKomponente
| Name | Typ | Standard |
|---|---|---|
source | string | null | undefined | "" |
size | MarkdownSize | "default" |
breaks | boolean | true |
SoneMarkdownEditorComponentKomponente
| Name | Typ | Standard |
|---|---|---|
valuebidirektional | string | "" |
modebidirektional | MarkdownEditorMode | "edit" |
appearance | MarkdownEditorAppearance | "field" |
toolbar | MarkdownEditorToolbar | "full" |
stickyToolbar | boolean | false |
toolbarPlacement | MarkdownEditorToolbarPlacement | "top" |
focusFrame | boolean | true |
tabs | boolean | true |
minRows | number | 4 |
ariaLabel | string | null | null |
ariaLabelledby | string | null | null |
ariaDescribedby | string | null | null |
maxlength | number | null | null |
placeholder | string | "" |
spellcheck | boolean | true |
autocapitalize | string | "sentences" |
readonly | boolean | false |
busy | boolean | false |
invalid | boolean | false |
textareaClass | string | "" |
live | boolean | false |
imageSource | MarkdownImageResolver | null | null |
shortcuts | boolean | true |
continueLists | boolean | true |
| Name | Typ |
|---|---|
editorInput | Event |
editorKeydown | KeyboardEvent |
editorPaste | ClipboardEvent |
editorDragover | DragEvent |
editorDrop | DragEvent |
editorFocus | FocusEvent |
editorBlur | FocusEvent |
selectionChange | MarkdownSelection |
toolbarCommand | MarkdownToolbarCommandEvent |