@@ -31,7 +31,7 @@ export default (editor, opts = {}) => {
31
31
defaults : {
32
32
content : `.` ,
33
33
traits : [ 'id' , 'title' , { label : 'text' , type : 'text' , name : 'content' , changeProp : true } ] ,
34
- attributes : { class : 'container mx-auto' }
34
+ attributes : { class : 'container mx-auto flex justify-center p-4 ' }
35
35
} ,
36
36
} ,
37
37
view : {
@@ -481,11 +481,11 @@ export default (editor, opts = {}) => {
481
481
domc . addType ( 'daisy-Radio' , {
482
482
model : {
483
483
defaults : {
484
- traits : [ 'id' , 'title' , { label : 'Radio code' , type : 'textarea' , name : 'content' , changeProp : true } ] ,
485
- content : `<input type="radio" name="radio-1" class="radio" checked />
486
- <input type="radio" name="radio-1" class="radio" />` ,
487
- tagName :'div' ,
484
+ traits : [ 'id' , 'title' , { label : 'Radio code' , type : 'text' , name : 'content' , changeProp : true } ] ,
485
+ content : `.` ,
486
+ tagName :'input' ,
488
487
editable : true ,
488
+ attributes : { class : 'radio' }
489
489
} ,
490
490
} ,
491
491
view : {
@@ -551,10 +551,11 @@ export default (editor, opts = {}) => {
551
551
domc . addType ( 'daisy-Input' , {
552
552
model : {
553
553
defaults : {
554
- traits : [ 'id' , 'title' , { label : 'Input code ' , type : 'textarea ' , name : 'content' , changeProp : true } ] ,
555
- content : `<input type="text" placeholder="Type here" class="input input-bordered w-full max-w-xs" /> ` ,
554
+ traits : [ 'id' , 'title' , 'placeholder' , { label : 'Input value ' , type : 'text ' , name : 'content' , changeProp : true } ] ,
555
+ content : `. ` ,
556
556
tagName :'input' ,
557
557
editable : true ,
558
+ attributes : { class : 'input input-bordered w-full max-w-xs' }
558
559
} ,
559
560
} ,
560
561
view : {
@@ -591,9 +592,10 @@ export default (editor, opts = {}) => {
591
592
model : {
592
593
defaults : {
593
594
traits : [ 'id' , 'title' , { label : 'Artboard code' , type : 'textarea' , name : 'content' , changeProp : true } ] ,
594
- content : `<div class="artboard artboard-horizontal phone-1"> 568×320</div> ` ,
595
- tagName :'input ' ,
595
+ content : `568×320` ,
596
+ tagName :'div ' ,
596
597
editable : true ,
598
+ attributes : { class : 'artboard artboard-horizontal phone-1' }
597
599
} ,
598
600
} ,
599
601
view : {
@@ -984,14 +986,24 @@ export default (editor, opts = {}) => {
984
986
model : {
985
987
defaults : {
986
988
traits : [ 'id' , 'title' , { label : 'Phone code' , type : 'textarea' , name : 'content' , changeProp : true } ] ,
987
- content : `<div class="mockup-phone">
988
- <div class="camera"></div>
989
- <div class="display">
990
- <div class="artboard artboard-demo phone-1">Hi.</div>
991
- </div>
992
- </div>` ,
989
+ content : `.` ,
993
990
tagName :'div' ,
994
991
editable : true ,
992
+ attributes : { class : 'mockup-phone border bg-base-300' }
993
+ } ,
994
+ } ,
995
+ view : {
996
+
997
+ } ,
998
+ } ) ;
999
+ domc . addType ( 'daisy-camera' , {
1000
+ model : {
1001
+ defaults : {
1002
+ traits : [ 'id' , 'title' ] ,
1003
+ content : `` ,
1004
+ tagName :'div' ,
1005
+ editable : true ,
1006
+ attributes : { class : 'camera' }
995
1007
} ,
996
1008
} ,
997
1009
view : {
@@ -1002,11 +1014,10 @@ export default (editor, opts = {}) => {
1002
1014
model : {
1003
1015
defaults : {
1004
1016
traits : [ 'id' , 'title' , { label : 'Window code' , type : 'textarea' , name : 'content' , changeProp : true } ] ,
1005
- content : `<div class="mockup-window border bg-base-300">
1006
- <div class="flex justify-center px-4 py-16 bg-base-200">Hello!</div>
1007
- </div>` ,
1017
+ content : `.` ,
1008
1018
tagName :'div' ,
1009
1019
editable : true ,
1020
+ attributes : { class : 'mockup-window border bg-base-300' }
1010
1021
} ,
1011
1022
} ,
1012
1023
view : {
0 commit comments