Markdown & Editor

Render GitHub-flavoured markdown as prose, and edit it with a toolbar, live preview and split view.

Available in
  • Angular: available
  • Vue: available
  • React: available
  • React Native: not available yet

Usage

Planning sync with Ada Park and Leo Ruiz.

  • Cut the onboarding checklist to five steps

  • Ship it behind the short-onboarding flag

  • Draft the invite copy

  • Legal review by Friday

Import

ts
import {
  SoneFloatingDockDirective,
  SoneMarkdownComponent,
  SoneMarkdownEditorComponent,
  SoneMarkdownEditorFooterDirective,
  SoneMarkdownEditorToolsDirective,
  SoneMarkdownPreviewDirective,
} from "@surface-one/angular/markdown";

API reference

SoneFloatingDockDirectiveDirective

Selector
[soneFloatingDock]
Inputs
NameType Default
soneFloatingDockbooleanfalse
floatingDockAnchorrequiredHTMLElement—

SoneMarkdownComponentComponent

Selector
sone-markdown
Inputs
NameType Default
sourcestring | null | undefined""
sizeMarkdownSize"default"
breaksbooleantrue

SoneMarkdownEditorComponentComponent

Selector
sone-markdown-editor
Export as
soneMarkdownEditor
Inputs
NameType Default
valuetwo-waystring""
modetwo-wayMarkdownEditorMode"edit"
appearanceMarkdownEditorAppearance"field"
toolbarMarkdownEditorToolbar"full"
stickyToolbarbooleanfalse
toolbarPlacementMarkdownEditorToolbarPlacement"top"
focusFramebooleantrue
tabsbooleantrue
minRowsnumber4
ariaLabelstring | nullnull
ariaLabelledbystring | nullnull
ariaDescribedbystring | nullnull
maxlengthnumber | nullnull
placeholderstring""
spellcheckbooleantrue
autocapitalizestring"sentences"
readonlybooleanfalse
busybooleanfalse
invalidbooleanfalse
textareaClassstring""
livebooleanfalse
imageSourceMarkdownImageResolver | nullnull
shortcutsbooleantrue
continueListsbooleantrue
Outputs
NameType
editorInputEvent
editorKeydownKeyboardEvent
editorPasteClipboardEvent
editorDragoverDragEvent
editorDropDragEvent
editorFocusFocusEvent
editorBlurFocusEvent
selectionChangeMarkdownSelection
toolbarCommandMarkdownToolbarCommandEvent

SoneMarkdownEditorFooterDirectiveDirective

Selector
[soneMarkdownEditorFooter]

SoneMarkdownEditorToolsDirectiveDirective

Selector
[soneMarkdownEditorTools]

SoneMarkdownPreviewDirectiveDirective

Selector
ng-template[soneMarkdownPreview]