0.3.2 • Published 2 months ago

@equinor/fusion-react-markdown v0.3.2

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

@equinor/fusion-react-markdown

Published on npm

Storybook

Fusion Web Component

Installation

npm install @equinor/fusion-react-markdown

Markdown Editor

Example

import { MarkdownEditor } from '@equinor/fusion-react-markdown';

<MarkdownEditor props>
  **some** markdown *text*
</MarkdownEditor>

Usage

import { MarkdownEditor } from '@equinor/fusion-react-markdown';

const markdown = "# my heading here";
<MarkdownEditor 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';
0.3.2

2 months ago

0.3.0

7 months ago

0.1.2

8 months ago

0.2.0

8 months ago

0.1.1

10 months ago

0.3.1

5 months ago

0.1.0

1 year ago