GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.37k stars 4.05k forks source link

How hide video block ? #643

Closed tlatforlz closed 6 years ago

tlatforlz commented 6 years ago

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

hoainam12k commented 6 years ago
  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!

artf commented 6 years ago

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']
        }
      }
  });
tlatforlz commented 6 years ago

Thanks you @artf

lock[bot] commented 5 years ago

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.