GithubHelp home page GithubHelp logo

chaseottofy / react-lite-markdown Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 644 KB

custom markdown parser/editor with real-time preview. Built with react - avoids dangerousHTML

Home Page: https://chaseottofy.github.io/react-lite-markdown/

HTML 1.06% JavaScript 61.04% CSS 37.91%
markdown markdown-editor markdown-parser react react-markdown react-markdown-editor javascript content-editor react-editor

react-lite-markdown's Introduction

markdown lite

screen

features

  • Lighthouse: 100, 100, 100, 100
    • all themes adhere to contrast guidelines.
    • passes all accessibility checks.
    • tiny 50kb build.
    • avoids dangerouslySetInnerHTML.
  • editor with real-time preview.
  • preview scrolls with editor.
  • switch between column/row layout.
  • resize column/row layout.
  • custom dynamic number line system.
  • real-time file size.
  • real-time word and line count.
  • local storage.
  • save and upload files.
  • copy to clipboard.

about

What separates this from many other react markdown editors is the avoidance of dangerouslySetInnerHTML and the ability to resize the editor/preview panels. It also incorporates a dynamic numbered line system (similar to notepad++), along with three contrast-accessible themes, local storage, and a file upload/download system.

Note that this is not traditional markdown. I've kept things limited to purely what I find useful/use most of the time.

Markdown expressions are rendered/represented as react elements. Aside from avoiding potential security risks, delivering content through an actual react element raises performance significantly. Using setDangerousHtml & then performing HTML sanitation goes against every core principle of react's reconciliation process.

commands

#                H1
##               H2
###              H3
*text*           bold
[link](url)      link
{url}            image
<code></code>    codeblock
>                blockquote
- unordered      list
___              linebreak

react-lite-markdown's People

Contributors

chaseottofy avatar

Watchers

 avatar

react-lite-markdown's Issues

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.