equal
deleted
inserted
replaced
1 { |
1 { |
2 "$schema": "https://schemas.wp.org/trunk/block.json", |
2 "$schema": "https://schemas.wp.org/trunk/block.json", |
3 "apiVersion": 2, |
3 "apiVersion": 3, |
4 "name": "core/file", |
4 "name": "core/file", |
5 "title": "File", |
5 "title": "File", |
6 "category": "media", |
6 "category": "media", |
7 "description": "Add a link to a downloadable file.", |
7 "description": "Add a link to a downloadable file.", |
8 "keywords": [ "document", "pdf", "download" ], |
8 "keywords": [ "document", "pdf", "download" ], |
19 "source": "attribute", |
19 "source": "attribute", |
20 "selector": "a:not([download])", |
20 "selector": "a:not([download])", |
21 "attribute": "id" |
21 "attribute": "id" |
22 }, |
22 }, |
23 "fileName": { |
23 "fileName": { |
24 "type": "string", |
24 "type": "rich-text", |
25 "source": "html", |
25 "source": "rich-text", |
26 "selector": "a:not([download])" |
26 "selector": "a:not([download])" |
27 }, |
27 }, |
28 "textLinkHref": { |
28 "textLinkHref": { |
29 "type": "string", |
29 "type": "string", |
30 "source": "attribute", |
30 "source": "attribute", |
40 "showDownloadButton": { |
40 "showDownloadButton": { |
41 "type": "boolean", |
41 "type": "boolean", |
42 "default": true |
42 "default": true |
43 }, |
43 }, |
44 "downloadButtonText": { |
44 "downloadButtonText": { |
45 "type": "string", |
45 "type": "rich-text", |
46 "source": "html", |
46 "source": "rich-text", |
47 "selector": "a[download]" |
47 "selector": "a[download]" |
48 }, |
48 }, |
49 "displayPreview": { |
49 "displayPreview": { |
50 "type": "boolean" |
50 "type": "boolean" |
51 }, |
51 }, |
54 "default": 600 |
54 "default": 600 |
55 } |
55 } |
56 }, |
56 }, |
57 "supports": { |
57 "supports": { |
58 "anchor": true, |
58 "anchor": true, |
59 "align": true |
59 "align": true, |
|
60 "spacing": { |
|
61 "margin": true, |
|
62 "padding": true |
|
63 }, |
|
64 "color": { |
|
65 "gradients": true, |
|
66 "link": true, |
|
67 "text": false, |
|
68 "__experimentalDefaultControls": { |
|
69 "background": true, |
|
70 "link": true |
|
71 } |
|
72 }, |
|
73 "interactivity": true |
60 }, |
74 }, |
61 "viewScript": "file:./view.min.js", |
|
62 "editorStyle": "wp-block-file-editor", |
75 "editorStyle": "wp-block-file-editor", |
63 "style": "wp-block-file" |
76 "style": "wp-block-file" |
64 } |
77 } |