LucaRickli / mdie

Markdown inline editor

Home Page:https://lucarickli.github.io/mdie/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MDIE

Markdown inline editor.

workflow npm size

Install

npm i -S @lucarickli/mdie

CSS

Note A new line can be created by clicking onto the padding of a target child. Without this padding you wont be able to directly create new lines.

The editor itself does not come with any css, instead it adds the class tag mdie to the target. Here is a snippet to include in your app for a basic working example.

.mdie > * {
  padding-bottom: 8px;
}

Example

import Mdie from '@lucarickli/mdie'
import marked from 'marked'

const editor = new Mdie({
  target: document.body,
  markdown: `# Hello world`,
  parse: (md) => marked.parse(md) // 3rd party library
})

About

Markdown inline editor

https://lucarickli.github.io/mdie/


Languages

Language:TypeScript 61.2%Language:HTML 34.9%Language:JavaScript 3.8%