DmitrMakeev commited on
Commit
50a08a2
·
verified ·
1 Parent(s): 2443a96

Update pages.html

Browse files
Files changed (1) hide show
  1. pages.html +36 -6
pages.html CHANGED
@@ -512,6 +512,12 @@ editor.DomComponents.addType('form-input', {
512
  console.log('Form input initialized with placeholder: ', this.getAttribute('placeholder'));
513
  },
514
  traits: [
 
 
 
 
 
 
515
  {
516
  type: 'text',
517
  name: 'placeholder',
@@ -526,8 +532,7 @@ editor.DomComponents.addType('form-input', {
526
  },
527
  ],
528
  },
529
- // Указываем, какие свойства нужно передать в скрипт
530
- 'script-props': ['placeholder', 'required'],
531
  },
532
  });
533
 
@@ -538,6 +543,12 @@ editor.DomComponents.addType('form-select', {
538
  console.log('Form select initialized with options: ', this.options);
539
  },
540
  traits: [
 
 
 
 
 
 
541
  {
542
  type: 'text',
543
  name: 'options',
@@ -552,7 +563,7 @@ editor.DomComponents.addType('form-select', {
552
  },
553
  ],
554
  },
555
- 'script-props': ['options', 'required'],
556
  },
557
  });
558
 
@@ -563,6 +574,12 @@ editor.DomComponents.addType('form-checkbox', {
563
  console.log('Form checkbox initialized. Required: ', this.getAttribute('required'));
564
  },
565
  traits: [
 
 
 
 
 
 
566
  {
567
  type: 'checkbox',
568
  name: 'required',
@@ -571,7 +588,7 @@ editor.DomComponents.addType('form-checkbox', {
571
  },
572
  ],
573
  },
574
- 'script-props': ['required'],
575
  },
576
  });
577
 
@@ -594,6 +611,12 @@ editor.DomComponents.addType('form-button', {
594
  });
595
  },
596
  traits: [
 
 
 
 
 
 
597
  {
598
  type: 'text',
599
  name: 'text',
@@ -620,7 +643,7 @@ editor.DomComponents.addType('form-button', {
620
  },
621
  ],
622
  },
623
- 'script-props': ['text', 'avp', 'grups', 'redirect'],
624
  },
625
  });
626
 
@@ -635,6 +658,12 @@ editor.DomComponents.addType('privacy-policy-link', {
635
  console.log('Privacy policy link initialized with href: ', props.href);
636
  },
637
  traits: [
 
 
 
 
 
 
638
  {
639
  type: 'text',
640
  name: 'href',
@@ -649,13 +678,14 @@ editor.DomComponents.addType('privacy-policy-link', {
649
  },
650
  ],
651
  },
652
- 'script-props': ['href', 'newWindow'],
653
  },
654
  });
655
 
656
 
657
 
658
 
 
659
 
660
  // Добавление кнопки для открытия редактора кода
661
  const pn = editor.Panels;
 
512
  console.log('Form input initialized with placeholder: ', this.getAttribute('placeholder'));
513
  },
514
  traits: [
515
+ {
516
+ type: 'text',
517
+ name: 'id',
518
+ label: 'Id',
519
+ changeProp: true,
520
+ },
521
  {
522
  type: 'text',
523
  name: 'placeholder',
 
532
  },
533
  ],
534
  },
535
+ 'script-props': ['id', 'placeholder', 'required'],
 
536
  },
537
  });
538
 
 
543
  console.log('Form select initialized with options: ', this.options);
544
  },
545
  traits: [
546
+ {
547
+ type: 'text',
548
+ name: 'id',
549
+ label: 'Id',
550
+ changeProp: true,
551
+ },
552
  {
553
  type: 'text',
554
  name: 'options',
 
563
  },
564
  ],
565
  },
566
+ 'script-props': ['id', 'options', 'required'],
567
  },
568
  });
569
 
 
574
  console.log('Form checkbox initialized. Required: ', this.getAttribute('required'));
575
  },
576
  traits: [
577
+ {
578
+ type: 'text',
579
+ name: 'id',
580
+ label: 'Id',
581
+ changeProp: true,
582
+ },
583
  {
584
  type: 'checkbox',
585
  name: 'required',
 
588
  },
589
  ],
590
  },
591
+ 'script-props': ['id', 'required'],
592
  },
593
  });
594
 
 
611
  });
612
  },
613
  traits: [
614
+ {
615
+ type: 'text',
616
+ name: 'id',
617
+ label: 'Id',
618
+ changeProp: true,
619
+ },
620
  {
621
  type: 'text',
622
  name: 'text',
 
643
  },
644
  ],
645
  },
646
+ 'script-props': ['id', 'text', 'avp', 'grups', 'redirect'],
647
  },
648
  });
649
 
 
658
  console.log('Privacy policy link initialized with href: ', props.href);
659
  },
660
  traits: [
661
+ {
662
+ type: 'text',
663
+ name: 'id',
664
+ label: 'Id',
665
+ changeProp: true,
666
+ },
667
  {
668
  type: 'text',
669
  name: 'href',
 
678
  },
679
  ],
680
  },
681
+ 'script-props': ['id', 'href', 'newWindow'],
682
  },
683
  });
684
 
685
 
686
 
687
 
688
+
689
 
690
  // Добавление кнопки для открытия редактора кода
691
  const pn = editor.Panels;