Issue #2357💬 AnsweredOpened October 30, 2019by giorgiosjames0 reactions

Video boolean attributes breaks on import

快速解答by artf

At first look the issue might be here: https://github.com/artf/grapesjs/blob/a850a305b80b8f86c0e7e4fb92b6492c2e5a1957/src/dom_components/model/ComponentVideo.js#L115-L117 indeed in the export/import I'd expect just ... controls> and not ... controls="controls">. The HTML code generator should use single attributes whe...

Read full answer below ↓

Question

Explanation Using https://grapesjs.com/demo.html v0.15.8 on Chrome 77.0.3~ Windows 10 Pro Build 18362 Importing a Video component with any Boolean attribute (controls, loop, autoplay) using the import modal will break all boolean attributes on the component until the component is deleted.

Reproduction Steps

  • Navigate to https://grapesjs.com/demo.html
  • Clear the canvas
  • Drag in a 'Video' Block
  • Ensure the 'Controls' boolean attribute is checked (should be by default)
  • Open the import code modal
  • Click import
  • Boolean attribute traits no longer work on the component
  • Also can't re-import the video with the boolean attribute removed

Screencast Screencast showing video working as expected, and then the bug. grapesVideoBug

Answers (1)

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.