Issue #1514💬 AnsweredOpened October 15, 2018by himanshubudhlakoti2 reactions

How to add video block on blockManager

快速解答by yomeshgupta1

@himanshubudhlakoti You can use https://github.com/artf/grapesjs-blocks-basic as a plugin. It has pre built blocks. Documentation is pretty straight forward on this.

Read full answer below ↓

Question

Hello All. i want to add a video block on blockmanager same as mentioned on below snapshot aaaa

i am using following code for adding video block on block manager

editor = grapesjs.init({
      autorender: 0,
      container: '#gjs',
      components: '<div class="txt-red"></div>',
      style: '.txt-red{color: red}',

blockManager: {
        appendTo: '#gjs',
        blocks: [
          {
            id: 'Video',
            label: 'Video',
            attributes: { class:'fa fa-video'},
            content: `
            <video controls>
            <source src="https://www.w3schools.com/tags/movie.mp4" type="video/mp4">
            <source src="https://www.w3schools.com/tags/movie.mp4" type="video/ogg">
            Your video
          </video>`,
            category: 'Basic',
          },
    ]

})```
 but that code does not works
please let me know how can i add video block on block manager 

Answers (3)

himanshubudhlakotiOctober 15, 2018

thnak you @yomeshgupta it has done

yomeshguptaOctober 15, 2018

@himanshubudhlakoti You are welcome! Close this issue if it is resolved.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.