GithubHelp home page GithubHelp logo

jonatansalas / yamde Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adrianapan/yamde

1.0 1.0 0.0 491 KB

Yet another markdown editor.

Home Page: https://codesandbox.io/s/modest-framework-6zmgb?file=/src/App.js

License: MIT License

TypeScript 100.00%

yamde's Introduction

YAMDE

yamde_logo_light

Y.A.M.D.E - yet another markdown editor.

Demo:

View YAMDE demo


🌱 Features

  • Responsive
  • Light/dark mode support
  • Customizable toolbar
  • Lightweight: Bundlephobia

🔧 Installation

npm install yamde


💻 Usage

Example implementation:

import React, { useState } from 'react'
import Yamde from 'yamde'

export const App = () => {
  const [text, setText] = useState('')

  return <Yamde value={text} handler={setText} theme="light" />
}

⚙️ Options

🎨 Themes

There are two available theme: dark and light. This can be controlled via the theme prop (defaults to light if non specified).

Light

<Yamde value={text} handler={setText} theme="light" />

CleanShot 2021-04-15 at 00 26 39

Dark

<Yamde value={text} handler={setText} theme="dark" />

CleanShot 2021-04-15 at 00 28 50

⌨️ Toolbar actions

You can customize the toolbar actions by passing in the toolbar prop (toolbar?: string[]). Omiting this prop will default to showing all available actions.

<Yamde value={text} handler={setText} toolbar={['bold', 'italic', 'strikethrough']} />

Available actions:

Identifier Description
bold Bold text.
italic Italic text.
strikethrough Strikethrough text
heading1 Heading 1 (H1)
heading2 Heading 2 (H2)
heading3 Heading 3 (H3)
ulist Unordered list
olist Ordered list
table Table markdown
image Image markdown
quote Blockquote markdown
code Code highlight
hr Horizontal rule

yamde's People

Contributors

adrianapan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.