Skip to content

EasyWebApp/markdown-area-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown Area Element

MarkDown Editor element based on Web Components & WebCell v2

NPM Dependency CI & CD

NPM

Usage

import { documentReady, render, createCell } from 'web-cell';
import { FileCellProps, FileCell } from 'file-cell';
import { MarkdownAreaElement } from 'markdown-area-element';

const upload: FileCellProps['transport'] = async file => {
    const response = await fetch('/file', {
        method: 'POST',
        body: file
    });
    const { path } = await response.json();

    return { path };
};

documentReady.then(() =>
    render(
        <FileCell transport={upload}>
            <MarkdownAreaElement name="markdown">
                default text
            </MarkdownAreaElement>
        </FileCell>
    )
);

About

MarkDown Editor element based on Web Components & WebCell v2

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published