diff --git a/README.md b/README.md index 5771032..80b8de3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Markdown inline editor. ### [Demo](https://lucarickli.github.io/mdie/) +### [Documentation](https://lucarickli.github.io/mdie/docs) + ### Install ```sh @@ -25,34 +27,13 @@ Here is a snippet to include in your app for a basic working example. } ``` -### API - -```ts -declare class InlineEditor { - constructor({ - target, - markdown, - parse - }: { - target: HTMLElement | Element | Document | ShadowRoot - markdown: string - parse: (md: string) => string - }) - - get changesMade(): boolean - - get markdown(): string - - cleanup(save?: boolean): void -} -``` - ### Example ```ts -import { InlineEditor } from '@lucarickli/mdie' +import Mdie from '@lucarickli/mdie' +import marked from 'marked' -const editor = new InlineEditor({ +const editor = new Mdie({ target: document.body, markdown: `# Hello world`, parse: (md) => marked.parse(md) // 3rd party library diff --git a/package.json b/package.json index 9a1203d..bc37ab2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@lucarickli/mdie", "description": "Markdown inline editor", - "version": "0.0.2", + "version": "0.0.3", "repository": { "type": "git", "url": "https://github.com/lucarickli/mdie.git" @@ -13,8 +13,7 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", - "build:pages": "tsc && vite build --config pages.vite.config.js", - "typedoc": "typedoc src/main.ts", + "build:pages": "tsc && vite build --config pages.vite.config.js && typedoc --basePath /mdie/docs --out dist/docs src/main.ts", "format": "prettier --write ." }, "devDependencies": {