0.1.4 • Published 4 years ago

@ludekarts/miniedit v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

MiniEdit

Minimalistic, Markdown-based rich text editor. To do description . . .

Install

npm i @ludekarts/miniedit

Usage

With bundler:

import MiniEdit from "@ludekarts/miniedit";

const editor = MiniEdit("#container");

With browser:

. . .

MiniEdit API

setText(markdown)

Sets full text in the editor e.g:

editor.setText(`
  # Hello world

  This is some paragraph of text. This one is **bold**.
`);

insertText(markdown)

Insert markdown in place of the caret.

editor.insertText(`![myImage](https://link.to/my/image.png)`);

getText()

Returns whole markdown markup from the document.

editor.getText();
0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago