GithubHelp home page GithubHelp logo

trevormills / react-simple-wysiwyg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from megahertz/react-simple-wysiwyg

0.0 1.0 0.0 435 KB

Simple and lightweight React WYSIWYG editor

Home Page: https://megahertz.github.io/react-simple-wysiwyg/

License: MIT License

JavaScript 13.97% TypeScript 80.28% CSS 5.75%

react-simple-wysiwyg's Introduction

react-simple-wysiwyg

Build Status NPM version npm bundle size

Simple and lightweight React WYSIWYG editor. Demo.

Description

Screenshot

It can be helpful if you only need basic text operations. It's:

  • pretty small (~8.6kb, ~3.6kb gzipped)
  • fast
  • simple to configure
  • simple to extend

Of course, it's not so powerful as other complex editors. It DOES NOT:

  • ✗ change HTML generated by a browser (sometimes it can be too dirty)
  • ✗ sanitize HTML (you can use sanitize-html)
  • ✗ contain a lot of features as others (like table editor, image editor and so on)
  • ✗ support old browsers (IE 11 is minimal)

If you need more powerful solution for React, you'd better take a look at:

Usage

  1. Install with npm:

    npm install react-simple-wysiwyg

    or CDN (unpkg.com)

    <script src="//unpkg.com/react-simple-wysiwyg"></script>

  2. Use the component

    import React from 'react';
    import { DefaultEditor } from 'react-simple-wysiwyg';
    
    function App() {
      const [html, setHtml] = React.useState('my <b>HTML</b>');
      
      function onChange(e) {
        setHtml(e.target.value);
      }
    
      return (
        <DefaultEditor value={html} onChange={onChange} />
      );
    }

Credits

react-simple-wysiwyg's People

Contributors

megahertz avatar harshzalavadiya avatar

Watchers

James Cloos 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.