1.2.1 • Published 2 months ago

@equinor/fusion-wc-markdown v1.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

fusion-wc-markdown Published on npm

Storybook

Installation

npm install @equinor/fusion-wc-markdown

Markdown Editor

Example

<fusion-wc-markdown-editor props>
  **some** markdown *text*
</fusion-wc-markdown-editor>

Usage

const markdown = "# my heading here";
<fwc-markdown-editor value={markdown} onInput={(e)=>{console.log(e.target._value)}} change={console.log} />

Properties/Attributes

NameTypeDefaultDescription
menuItemsArray<MdMenuItemType>*['strong', 'em', 'bullet_list', 'ordered_list']List of visible menu buttons
minHeightstring''Markdown Editor minimum height
valuestring''Markdown editors value
menuSizeMenuSizes**'medium'Size of the menu buttons

* Array<MdMenuItemType> is list of showing visible menu buttons available as MdMenuItemType.

type MdMenuItemType =
  | 'strong'
  | 'em'
  | 'link'
  | 'ordered_list'
  | 'bullet_list'
  | 'paragraph'
  | 'blockquote'
  | 'h1'
  | 'h2'
  | 'h3';

* MenuSizes type imported from markdown component.

type MenuSizes = 'small' | 'medium' | 'large';