Commit da333f5 1 parent 82b0f6e commit da333f5 Copy full SHA for da333f5
File tree 2 files changed +6
-11
lines changed
lib/template-generator/components
2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ class TextArea {
3
3
value = "" ;
4
4
label = "Saisir un contenu" ;
5
5
constructor ( value = "" , label ) {
6
- this . value = value ;
6
+ this . value = value . value ;
7
7
this . label = label ;
8
8
}
9
9
render = ( ) => {
@@ -13,12 +13,9 @@ class TextArea {
13
13
<div class="col-12">
14
14
<textarea
15
15
class="form-control form-control-sm component-form"
16
- row="5"
17
16
style="height:100px"
18
17
id="${ this . uuid } "
19
- name=""
20
- value="${ this . value } ">
21
- </textarea>
18
+ name="">${ this . value ? decodeURI ( this . value ) . trim ( ) : "" } </textarea>
22
19
</div>
23
20
</div>
24
21
` ;
Original file line number Diff line number Diff line change @@ -11,13 +11,11 @@ export const header = () => ({
11
11
12
12
const defaultTypeFields = [ ] ;
13
13
14
- const attributes = [ "data-type-selector" , "data- value"] ;
14
+ const attributes = [ "data-value" ] ;
15
15
16
16
export default class FreeComponent extends TemplateComponent {
17
17
constructor ( customHeader , defaultAttrValues ) {
18
- let defaultValues = new Map ( [
19
- //["data-type-selector", "static"]
20
- ] ) ;
18
+ let defaultValues = new Map ( ) ;
21
19
if ( defaultAttrValues ) {
22
20
attributes . forEach ( ( a ) => {
23
21
defaultValues . set ( a , defaultAttrValues [ a ] ) ;
@@ -41,10 +39,10 @@ export default class FreeComponent extends TemplateComponent {
41
39
return `
42
40
<div class="${ header ( ) . class } template-component mb-2"
43
41
data-type-selector=""
44
- data-value=""
42
+ data-value="${ encodeURI ( value ) } "
45
43
data-component="${ header ( ) . class } "
46
44
>
47
- ${ value . replaceAll ( '"' , "'" ) }
45
+ ${ value }
48
46
</div>
49
47
` ;
50
48
} ;
You can’t perform that action at this time.
0 commit comments