Socket
Socket
Sign inDemoInstall

grapesjs-style-filter

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grapesjs-style-filter

GrapesJS Style Filter


Version published
Weekly downloads
937
increased by14.27%
Maintainers
1
Install size
12.9 kB
Created
Weekly downloads
 

Readme

Source

GrapesJS Style Filter

This plugins adds a new filter built-in style property which can be used for CSS properties like filter and backdrop-filter.

Demo

GrapesJS

Requires GrapesJS v0.18.3 or higher

Summary

  • Plugin name: grapesjs-style-filter
  • New Style Manager built-in property
    • filter

Download

  • CDN
    • https://unpkg.com/grapesjs-style-filter
  • NPM
    • npm i grapesjs-style-filter
  • GIT
    • git clone https://github.com/GrapesJS/style-filter.git

Usage

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-style-filter.min.js"></script>

<div id="gjs"></div>

<script type="text/javascript">
  const editor = grapesjs.init({
      container : '#gjs',
      // ...
      plugins: ['grapesjs-style-filter'],

      // Use the property on init
      styleManager: {
        sectors: [
          // ...
          {
            id: 'extra',
            name: 'Extra',
            properties: [
              { extend: 'filter' },
              { extend: 'filter', property: 'backdrop-filter' },
            ],
          }
        ]
      },
  });

  // or add it to the StyleManager via API
  editor.StyleManager.addProperty('extra', { extend: 'filter' });
  editor.StyleManager.addProperty('extra', { extend: 'filter', property: 'backdrop-filter' });
</script>

Modern javascript

import grapesjs from 'grapesjs';
import styleFilter from 'grapesjs-style-filter';

const editor = grapesjs.init({
  container : '#gjs',
  plugins: [styleFilter, /*...*/],
  // Same StyleManager configuration
});
// Same StyleManager API usage

Development

Clone the repository

$ git clone https://github.com/GrapesJS/style-filter.git
$ cd grapesjs-style-filter

Install dependencies

$ npm i

Start the dev server

$ npm start

License

BSD 3-Clause

Keywords

FAQs

Last updated on 09 Jun 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc