@innovastudio/contentbuilder 1.0.52 → 1.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
4
4
  "description": "",
5
5
  "main": "public/contentbuilder/contentbuilder.esm.js",
6
6
  "files": [
@@ -3815,6 +3815,7 @@ button:focus {
3815
3815
  margin-top: 5px;
3816
3816
  font-size: 13px;
3817
3817
  opacity: 0.5;
3818
+ color: #333;
3818
3819
  }
3819
3820
 
3820
3821
  .is-builder .row-active.row-add-initial {
@@ -57185,6 +57185,7 @@ class ContentBuilder {
57185
57185
  zoom: 1,
57186
57186
  useLightbox: false,
57187
57187
  imageRenameOnEdit: true,
57188
+ disableAutoEmbedVideo: false,
57188
57189
 
57189
57190
  /*
57190
57191
  onZoomStart: () => {
@@ -59473,26 +59474,29 @@ class ContentBuilder {
59473
59474
  let contentword = document.querySelector('#idContentWord'); //Check video embed
59474
59475
 
59475
59476
  var bPasteObject = false;
59476
- var src = contentword.innerText; //var youRegex = /^http[s]?:\/\/(((www.youtube.com\/watch\?(feature=player_detailpage&)?)v=)|(youtu.be\/))([^#\&\?]*)/;
59477
+ var src = contentword.innerText;
59477
59478
 
59478
- var youRegex = /^http[s]?:\/\/(((www.youtube.com\/watch\?(feature=player_detailpage&)?)v=)|(youtu.be\/))([^#&?]*)/;
59479
- var vimeoRegex = /^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/)|(video\/))?([0-9]+)\/?/;
59480
- var youRegexMatches = youRegex.exec(src);
59481
- var vimeoRegexMatches = vimeoRegex.exec(src);
59479
+ if (!this.opts.disableAutoEmbedVideo) {
59480
+ //var youRegex = /^http[s]?:\/\/(((www.youtube.com\/watch\?(feature=player_detailpage&)?)v=)|(youtu.be\/))([^#\&\?]*)/;
59481
+ var youRegex = /^http[s]?:\/\/(((www.youtube.com\/watch\?(feature=player_detailpage&)?)v=)|(youtu.be\/))([^#&?]*)/;
59482
+ var vimeoRegex = /^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/)|(video\/))?([0-9]+)\/?/;
59483
+ var youRegexMatches = youRegex.exec(src);
59484
+ var vimeoRegexMatches = vimeoRegex.exec(src);
59482
59485
 
59483
- if (youRegexMatches !== null || vimeoRegexMatches !== null) {
59484
- if (youRegexMatches !== null && youRegexMatches.length >= 7) {
59485
- var youMatch = youRegexMatches[6];
59486
- src = 'https://www.youtube.com/embed/' + youMatch + '?rel=0';
59487
- }
59486
+ if (youRegexMatches !== null || vimeoRegexMatches !== null) {
59487
+ if (youRegexMatches !== null && youRegexMatches.length >= 7) {
59488
+ var youMatch = youRegexMatches[6];
59489
+ src = 'https://www.youtube.com/embed/' + youMatch + '?rel=0';
59490
+ }
59488
59491
 
59489
- if (vimeoRegexMatches !== null && vimeoRegexMatches.length >= 7) {
59490
- var vimeoMatch = vimeoRegexMatches[6];
59491
- src = 'https://player.vimeo.com/video/' + vimeoMatch;
59492
- }
59492
+ if (vimeoRegexMatches !== null && vimeoRegexMatches.length >= 7) {
59493
+ var vimeoMatch = vimeoRegexMatches[6];
59494
+ src = 'https://player.vimeo.com/video/' + vimeoMatch;
59495
+ }
59493
59496
 
59494
- sPastedText = '<div class="embed-responsive embed-responsive-16by9"><iframe width="560" height="315" src="' + src + '" frameborder="0" allowfullscreen=""></iframe></div>';
59495
- bPasteObject = true;
59497
+ sPastedText = '<div class="embed-responsive embed-responsive-16by9"><iframe width="560" height="315" src="' + src + '" frameborder="0" allowfullscreen=""></iframe></div>';
59498
+ bPasteObject = true;
59499
+ }
59496
59500
  }
59497
59501
 
59498
59502
  if (!bPasteObject) {