thanhtunguet / Grapesjs React
A React wrapper for GrapesJS library
Stars: ✭ 93
Programming Languages
javascript
184084 projects - #8 most used programming language
typescript
32286 projects
Projects that are alternatives of or similar to Grapesjs React
Css Flags
A collection of pure CSS flags, all single divs.
Stars: ✭ 90 (-3.23%)
Mutual labels: library
Raisincss
An Utility CSS only library. It supports css grid and many more useful css properties.
Stars: ✭ 93 (+0%)
Mutual labels: library
Bcast
Broadcasting library for Go. Broadcast message of any type on a set of channels. WIP
Stars: ✭ 90 (-3.23%)
Mutual labels: library
Amadeus Node
Node library for the Amadeus Self-Service travel APIs
Stars: ✭ 91 (-2.15%)
Mutual labels: library
Protobuf Nim
Protobuf implementation in pure Nim that leverages the power of the macro system to not depend on any external tools
Stars: ✭ 90 (-3.23%)
Mutual labels: library
Library
A collection of various articles and books I've are worth revisiting.
Stars: ✭ 93 (+0%)
Mutual labels: library
Ngx Select Dropdown
Custom Dropdown for Angular 4+ with multiple and single selection options
Stars: ✭ 91 (-2.15%)
Mutual labels: library
Breaker
🚧 Flexible mechanism to make execution flow interruptible.
Stars: ✭ 93 (+0%)
Mutual labels: library
Cdnjs
🤖 CDN assets - The #1 free and open source CDN built to make life easier for developers.
Stars: ✭ 9,270 (+9867.74%)
Mutual labels: library
Ngx Api Utils
ngx-api-utils is a lean library of utilities and helpers to quickly integrate any HTTP API (REST, Ajax, and any other) with Angular.
Stars: ✭ 92 (-1.08%)
Mutual labels: library
Python Isc Dhcp Leases
Small python module for reading /var/lib/dhcp/dhcpd.leases from isc-dhcp-server
Stars: ✭ 90 (-3.23%)
Mutual labels: library
Floatingactionmenu
I got the original code from douo here - gist.github.com/douo/dfde289778a9b3b6918f
Stars: ✭ 91 (-2.15%)
Mutual labels: library
Amazon Alexa Php
Php library for amazon echo (alexa) skill development.
Stars: ✭ 93 (+0%)
Mutual labels: library
Angular Librarian
An Angular 2+ scaffolding setup for creating libraries
Stars: ✭ 92 (-1.08%)
Mutual labels: library
grapesjs-react
React wrapper for GrapesJS
grapesjs-react
v3 was fully rewritten from scratch. The package is now only responsible to expose hooks and control the editor lifecycle for these reasons:
- This package depends on
artf/grapesjs
, which does not support Typescript. It is hard to implement custom features Components, Blocks without declaration files. - To be simple, this package should only control the lifecycle of the editor, leave the rest to the dependent projects.
Install
yarn add grapesjs-react
// or
npm i grapesjs-react --save
New editor props:
export interface EditorProps {
// Prefix identifier that will be used inside storing and loading
id?: string;
presetType?: 'webpage' | 'newsletter' | 'mjml';
// https://grapesjs.com/docs/modules/Plugins.html#basic-plugin
plugins?: string[];
children?: ReactElement<any> | Array<ReactElement<any>>;
// https://github.com/artf/grapesjs/blob/dev/src/storage_manager/config/config.js
storageManager?: any;
// https://github.com/artf/grapesjs/blob/dev/src/block_manager/config/config.js
blockManager?: any;
// https://github.com/artf/grapesjs/blob/dev/src/style_manager/config/config.js
styleManager?: {};
width?: string | number;
height?: string | number;
// https://grapesjs.com/docs/modules/Components.html
components?: object[];
blocks?: object[];
onInit?(editor): void;
onDestroy?(editor): void;
extraConfig?: object
}
Default props of the editor:
Editor.defaultProps = {
id: 'grapesjs-react-editor',
presetType: 'newsletter',
plugins: [],
blocks: [],
blockManager: {},
storageManager: {},
styleManager: {},
width: 'auto',
height: '100vh',
components: [],
extraConfig: {}
};
Introduce new hooks:
-
onInit
: Called after editor initializing, used for adding custom components, blocks, etc, ... -
onDestroy
: Called before editor unmounting, used for cleaning up.
Import CSS:
import 'grapesjs/dist/css/grapes.min.css';
See storybook demo: https://grapesjs-react.thanhtunguet.info
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].