• Stars
    star
    192
  • Rank 197,691 (Top 4 %)
  • Language
    JavaScript
  • Created over 5 years ago
  • Updated 8 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A React wrapper for GrapesJS library

grapesjs-react

A React wrapper library for GrapesJS

Online Demo

Installation

npm i -S grapesjs grapesjs-react

or

yarn add grapesjs grapesjs-react

Usage

WebPage

You need to install the grapesjs-preset-webpage plugin

import 'grapesjs-preset-webpage';

export const Primary = () => {
  return <GrapesjsReact
    id='grapesjs-react'
    plugins={[
      'gjs-preset-webpage',
      'gjs-blocks-basic'
    ]}
  />;
};

Newsletter

You need to install the grapesjs-preset-newsletter plugin

import 'grapesjs-preset-newsletter';

export const Newsletter = () => {
  return <GrapesjsReact
    id='grapesjs-react'
    plugins={[
      'gjs-preset-newsletter',
      'gjs-blocks-basic'
    ]}
  />;
};

MJML

You need to install the grapesjs-mjml plugin

import 'grapesjs-mjml';

export const MJML = () => {
  return <GrapesjsReact
    id='grapesjs-react'
    plugins={[
      'grapesjs-mjml',
      'gjs-blocks-basic'
    ]}
  />;
};

Props detail

Editor's props extends the base GrapesJS editor options.

Name Desc Type
id string Editor container id
children ReactNode[] Children to init (using fromElement)
onInit Function Function will be called after editor was initialized
onDestroy Function Function will be called when editor unmounted

The rest props will be passed as options to initialize editor. You can use any options of grapesjs like plugins, blockManager, styleManager, storageManager, ...

Contribution

If you find a bug or need any help, please create an issue.

Pull requests are welcome.

ยฉ2021 thanhtunguet

More Repositories

1

TelinkBleMesh

Telink BLE Mesh project, demo on Android
Java
10
star
2

react-native-awesome-mqtt

Awesome MQTT client for React Native. Forked from 'sp-react-native-mqtt'
Java
6
star
3

TelinkSigMeshLib

This library is a part of Telink Sig Mesh SDK. Published to GitHub for personal usage only. Visit the Telink Wiki to acquire the full SDK zip file and development handbooks.
Objective-C
6
star
4

Hackintosh-IceLake-Corei7-1065G7

ASL
3
star
5

az-react-native-android

Azure Devops Agent with React Native docker image included.
Shell
3
star
6

react-native-telink-ble

Telink BLE bridging library for React Native
Java
3
star
7

react-native-expandable-slider

Expandable Slider for React Native
TypeScript
2
star
8

az-docker-agent

Docker Image for Azure Devops Agent (with Node.js and DotNET Core 3.1 installed)
Shell
1
star
9

10-mins-mail

10 Minutes Mail SDK
PHP
1
star
10

Hackintosh-Acer-Aspire-E5-571

Hackintosh EFI for Acer Aspire E5-571
ASL
1
star
11

react-native-redux-theming

Theming your React Native apps with Redux global state
TypeScript
1
star
12

TelinkBleMeshLib

This library is a part of Telink Sig Mesh SDK. Published to GitHub for personal usage only. Visit the Telink Wiki to acquire the full SDK zip file and development handbooks.
Java
1
star
13

react-native-light-color-picker

Light color picker for React Native
TypeScript
1
star
14

TelinkSigMesh

SigMesh Objective-C Demo project
Objective-C
1
star
15

truesight_flutter

TrueSight Flutter
Dart
1
star
16

wattpad-scraper

Wattpad scraper server
TypeScript
1
star
17

react-native-my-unity

My Unity component for React Native
Java
1
star