sterment

1.0.0 • Public • Published

Markdown Editor

Markdown Editor is a lightweight JavaScript library for integrating a simple Markdown editor into your web applications.

Features

  • Basic Markdown Editing: Easily write and edit Markdown text.
  • Live Preview: See a live preview of the rendered HTML as you type.
  • Text Formatting: Format text with bold, italic, and links.

Installation

Install the Markdown Editor package from npm:

npm install markdown-editor

Usage

const editor = new MarkdownEditor('textarea-id');

Replace 'textarea-id' with the ID of your textarea element where you want to integrate the Markdown editor.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Markdown Editor Example</title>
  <link rel="stylesheet" href="markdown-editor.css">
</head>
<body>

<textarea id="editor"></textarea>

<script src="markdown-editor.js"></script>
<script>
  const editor = new MarkdownEditor('editor');
</script>

</body>
</html>

Dependencies

  • marked: For rendering Markdown text into HTML.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Readme

Keywords

none

Package Sidebar

Install

npm i sterment

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

4.32 kB

Total Files

3

Last publish

Collaborators

  • liverorrr