Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
grapesjs-pages
Advanced tools
Simple projects and templates manage plugin for GrapesJS
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet">
<script src="https://unpkg.com/grapesjs"></script>
<script src="https://unpkg.com/grapesjs-pages"></script>
<div id="gjs"></div>
const editor = grapesjs.init({
container: '#gjs',
height: '100%',
fromElement: true,
storageManager: false,
plugins: ['grapesjs-pages'],
pluginsOpts: {
'grapesjs-pages': {
templates: 'http://localhost:3000/templates',
projects: 'http://localhost:3000/projects',
}
}
});
body, html {
margin: 0;
height: 100%;
}
Plugin name: grapesjs-pages
Option | Description | Default |
---|---|---|
templates | API endpoint for templates. | null |
projects | API endpoint for projects. | null |
onLoad | Method to load projects or templates. | undefined |
onStore | Method to store data. | undefined |
onDelete | Method to delete a project. | undefined |
Let me know if you need further assistance!
templates
:
String
or null
null
projects
:
String
or null
null
onLoad
:
Function
undefined
type
(String): Type of data to load (templates
or projects
).Array
or null
: Array of loaded data or null if not found.onStore
:
Function
undefined
payload
(Object): Data to be stored.Boolean
: true
if stored successfully, false
otherwise.onDelete
:
Function
undefined
id
(String): ID of the project to delete.Boolean
: true
if deletion is successful, false
otherwise.https://unpkg.com/grapesjs-pages
npm i grapesjs-pages
git clone https://github.com/dipaksarkar/grapesjs-pages.git
Directly in the browser
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"/>
<script src="https://unpkg.com/grapesjs"></script>
<script src="path/to/grapesjs-pages.min.js"></script>
<div id="gjs"></div>
<script type="text/javascript">
var editor = grapesjs.init({
container: '#gjs',
// ...
plugins: ['grapesjs-pages'],
pluginsOpts: {
'grapesjs-pages': { /* options */ }
}
});
</script>
Modern javascript
import grapesjs from 'grapesjs';
import plugin from 'grapesjs-pages';
import 'grapesjs/dist/css/grapes.min.css';
const editor = grapesjs.init({
container : '#gjs',
// ...
plugins: [plugin],
pluginsOpts: {
[plugin]: { /* options */ }
}
// or
plugins: [
editor => plugin(editor, { /* options */ }),
],
});
Clone the repository
$ git clone https://github.com/dipaksarkar/grapesjs-pages.git
$ cd grapesjs-pages
Install dependencies
$ npm i
Start the dev server
$ npm start
Build the source
$ npm run build
MIT
FAQs
Grapesjs Pages
We found that grapesjs-pages demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.