Markdown Viewer — component.markdown-viewer
Sichere, tokenbasierte Markdown-Ausgabe für Fließtext, Listen, Checklisten, Code, Tabellen und Links. 1.2.0: eigener Parser ohne Fremdbibliothek, Erwähnungen @[Name](typ:id), Einbettungen ::embed[Titel](typ:id) und opt-in editable: derselbe Text bearbeitbar (Werkzeugleiste, Slash-Befehle, @-Vorschlä
Beispiele
Anzeige
Notiz
Mit @Anna Keller zu Muster GmbH abgestimmt.
- Angebot
- Termin
Bearbeitbar
Composer
Anzeige mit Code kopieren
Antwort mit Code:
console.log("test");Und ein zweiter Block:
npm run buildEigenschaften
| Prop | Typ | Default |
|---|---|---|
content * | string | — |
size | string: sm | md | lg | "md" |
liveView | string | "" |
liveAuto | boolean | true |
breaks | boolean | true |
linkTarget | string: same | blank | "blank" |
blankLines | boolean | false |
hideTools | string | "" |
valueSource | string: config | field | "config" |
collapsible | string: none | h1 | h2 | h3 | "none" |
collapsed | boolean | true |
collapseControls | boolean | false |
codeCopy | boolean | false |
stream | boolean | false |
scale | string: app | prose | "app" |
sourcePlaceholder | string | "" |
fallbackPlaceholder | string | "" |
editable | boolean | false |
placeholder | string | "" |
label | string | "" |
name | string | "" |
output | string: markdown | html | "markdown" |
htmlName | string | "" |
toolbar | string: fixed | bubble | none | "fixed" |
variant | string: plain | framed | compact | "plain" |
height | string: auto | sm | md | lg | fill | "auto" |
submitOnEnter | boolean | false |
contextMenu | boolean | true |
selectionMenu | boolean | true |
blockHandle | boolean | true |
emoji | boolean | false |
collaborative | boolean | false |
liveCarets | boolean | false |
softSections | boolean | false |
mentionsEnabled | boolean | true |
mentionTypes | string | "" |
pageSize | string: a4 | a4-landscape | a5 | letter | "a4" |
pageMarginBlock | number | 0 |
pageMarginInline | number | 0 |
autoPageBreak | boolean | false |
pageHeader | string | "" |
pageHeaderFirst | string | "" |
pageFooterFirst | string | "" |
pageFirstDifferent | boolean | false |
pageFooter | string | "" |
pageView | boolean | false |
commentMargin | boolean | false |
commenting | boolean | false |
comments | array | [] |
outline | boolean | false |
wordCount | boolean | false |
suggestions | boolean | false |
suggestOnly | boolean | false |
suggesting | boolean | false |
suggestionAuthor | string | "" |
findReplace | boolean | false |
saveUrl | string | "" |
rev | string | "" |
saveDelay | number | 1500 |
formatTools | boolean | false |
imageSource | string | "" |
imagePrefix | string | "" |
imageUpload | string | "" |
mentionSource | string | "" |
imageSchemes | string | "" |
mentions | array | [] |
Events & Slots
Events: link, mention, embed, change, submit
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--markdown-border | var(--color-border-default) |
--markdown-code-background | var(--color-surface-sunken) |
--markdown-link | var(--color-text-link) |
--markdown-text | var(--color-text-default) |
--markdown-muted | var(--color-text-muted) |
--markdown-radius | var(--radius-control) |
--markdown-accent | var(--color-action-primary) |
--markdown-mention-background | color-mix(in srgb, var(--color-action-primary) 12%, transparent) |
--markdown-overlay | var(--color-surface-overlay) |
--md-live-tone | var(--markdown-accent) |
--md-caret-tone | var(--color-series-1, var(--markdown-accent)) |
Genutzte Design-Tokens
border.emphasis border.hairline color.action.on-primary color.action.primary color.action.primary-hover color.border.default color.series.1 color.series.2 color.series.3 color.series.4 color.series.5 color.series.6 color.series.7 color.series.8 color.status.danger color.status.info color.status.success color.status.warning color.surface.default color.surface.overlay color.surface.sunken color.text.default color.text.inverse color.text.link color.text.muted container.2xs container.sm container.xs duration.fast easing.standard elevation.control elevation.overlay elevation.raised focus.ring-color focus.ring-offset focus.ring-width font.family.default font.family.display font.family.mono form.background form.border form.border-focus form.placeholder layer.dropdown layer.sticky leading.loose leading.tight radius.control radius.full radius.overlay radius.sm size.05 size.1 size.1-5 size.12 size.14 size.16 size.2 size.20 size.24 size.3 size.32 size.4 size.40 size.5 size.6 size.8 state.disabled-opacity tag.blue.tone tag.green.tone tag.orange.tone tag.red.tone tag.violet.tone text.2xl text.2xs text.lg text.md text.sm text.xl text.xs weight.medium weight.regular weight.semibold