Giter Site home page Giter Site logo

stevepond / elevate-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elm-street-technology/elevate-editor

0.0 1.0 0.0 967 KB

๐Ÿ“ง ๐Ÿ“ฑ ๐Ÿ— A drag-and-drop editor for building email templates and websites (๐Ÿšง๐Ÿšง๐Ÿšง)

Home Page: https://elevate-editor.netlify.com

License: MIT License

JavaScript 100.00%

elevate-editor's Introduction

Elevate Editor

Elevate Editor is an open-source, pluggable tool which can be utilized for building custom webpages, email templates, and more.

Should I Use This?

We are still making frequent changes to the internals and the API that is exposed. Feel free to use this now, but be aware that breaking changes are still likely at this point.

Demo

Usage

yarn add elevate-editor
import React, { Component, Fragment } from "react";
import ReactDOM from "react-dom";
import Editor from "elevate-editor";
import ThemeProvider from "elevate-ui/ThemeProvider";
import Paper from "elevate-ui/Paper";

class App extends Component {
  editor;

  render() {
    return (
      <ThemeProvider>
        <Paper>
          <Editor
            components={[]}
            content={[
              {
                type: "Row",
                attrs: {
                  disableDelete: true,
                  height: "600px",
                },
              },
            ]}
            innerRef={(editor) => {
              this.editor = editor;
            }}
            UPLOADCARE_API_KEY="demopublickey"
          />
          <button
            onClick={() => {
              console.log(this.editor.exportHTML());
            }}
          >
            Export HTML
          </button>
          <button
            onClick={() => {
              console.log(this.editor.exportJSON());
            }}
          >
            Export JSON
          </button>
        </Paper>
      </ThemeProvider>
    );
  }
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

(above example running in codesandbox.io)

elevate-editor's People

Contributors

jwdotjs avatar soxbox avatar erwstout avatar griffle avatar chrisheninger avatar nuex avatar pharv avatar thenorthremembers 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.