Grapesjs: How hide video block ?

Created on 14 Dec 2017  路  4Comments  路  Source: artf/grapesjs

Hi,
I'm using Basic Extensions Extensions in Grapesjs.
I want hide "Video Block" in this Extensions.
How I can do it ?
Thanks.

outdated

Most helpful comment

Actually there is an option for the purpose

var editor = grapesjs.init({
     ...
      container : '#gjs',
      plugins: ['gjs-blocks-basic'],
      pluginsOpts: {
        'gjs-blocks-basic': {
          // Which blocks to add, just omit 'video'
          blocks: ['column1', 'column2', 'column3', 'column3-7', 'text', 'link', 'image', 'map']
        }
      }
  });

All 4 comments

  1. Open src/blocks.js. Remove line 95 -> 109 (line 95 start with if (blocks.indexOf('video') >= 0) {)
  2. Open src/index.js, line 7: remove 'video',

Rebuild package. I guess it will work!

Actually there is an option for the purpose

var editor = grapesjs.init({
     ...
      container : '#gjs',
      plugins: ['gjs-blocks-basic'],
      pluginsOpts: {
        'gjs-blocks-basic': {
          // Which blocks to add, just omit 'video'
          blocks: ['column1', 'column2', 'column3', 'column3-7', 'text', 'link', 'image', 'map']
        }
      }
  });

Thanks you @artf

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ionic666 picture ionic666  路  3Comments

Snarkly picture Snarkly  路  3Comments

FlashPapa picture FlashPapa  路  3Comments

kosirm picture kosirm  路  3Comments

crazyxhz picture crazyxhz  路  3Comments