Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a way to use this library with a "<video/>" tag rather than an iframe? #11

Open
grimace opened this issue Sep 18, 2019 · 1 comment

Comments

@grimace
Copy link

grimace commented Sep 18, 2019

for a number of reasons, I'm forced to use a video tag rather than an iframe. is there a way to use this for that purpose?

@pascalbaljet
Copy link

class VideoSpec extends ImageSpec {
  init() {
    var vm = this;

    this.formatter.quill.root.addEventListener("click", function (event) {
      var el = event.target;

      if (!(el instanceof HTMLElement) || el.tagName !== "VIDEO") {
        return;
      }

      vm.img = el;
      vm.formatter.show(vm);
    });
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants