block.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 2,
  4. "name": "core/table",
  5. "title": "Table",
  6. "category": "text",
  7. "description": "Create structured content in rows and columns to display information.",
  8. "textdomain": "default",
  9. "attributes": {
  10. "hasFixedLayout": {
  11. "type": "boolean",
  12. "default": false
  13. },
  14. "caption": {
  15. "type": "string",
  16. "source": "html",
  17. "selector": "figcaption",
  18. "default": ""
  19. },
  20. "head": {
  21. "type": "array",
  22. "default": [],
  23. "source": "query",
  24. "selector": "thead tr",
  25. "query": {
  26. "cells": {
  27. "type": "array",
  28. "default": [],
  29. "source": "query",
  30. "selector": "td,th",
  31. "query": {
  32. "content": {
  33. "type": "string",
  34. "source": "html"
  35. },
  36. "tag": {
  37. "type": "string",
  38. "default": "td",
  39. "source": "tag"
  40. },
  41. "scope": {
  42. "type": "string",
  43. "source": "attribute",
  44. "attribute": "scope"
  45. },
  46. "align": {
  47. "type": "string",
  48. "source": "attribute",
  49. "attribute": "data-align"
  50. }
  51. }
  52. }
  53. }
  54. },
  55. "body": {
  56. "type": "array",
  57. "default": [],
  58. "source": "query",
  59. "selector": "tbody tr",
  60. "query": {
  61. "cells": {
  62. "type": "array",
  63. "default": [],
  64. "source": "query",
  65. "selector": "td,th",
  66. "query": {
  67. "content": {
  68. "type": "string",
  69. "source": "html"
  70. },
  71. "tag": {
  72. "type": "string",
  73. "default": "td",
  74. "source": "tag"
  75. },
  76. "scope": {
  77. "type": "string",
  78. "source": "attribute",
  79. "attribute": "scope"
  80. },
  81. "align": {
  82. "type": "string",
  83. "source": "attribute",
  84. "attribute": "data-align"
  85. }
  86. }
  87. }
  88. }
  89. },
  90. "foot": {
  91. "type": "array",
  92. "default": [],
  93. "source": "query",
  94. "selector": "tfoot tr",
  95. "query": {
  96. "cells": {
  97. "type": "array",
  98. "default": [],
  99. "source": "query",
  100. "selector": "td,th",
  101. "query": {
  102. "content": {
  103. "type": "string",
  104. "source": "html"
  105. },
  106. "tag": {
  107. "type": "string",
  108. "default": "td",
  109. "source": "tag"
  110. },
  111. "scope": {
  112. "type": "string",
  113. "source": "attribute",
  114. "attribute": "scope"
  115. },
  116. "align": {
  117. "type": "string",
  118. "source": "attribute",
  119. "attribute": "data-align"
  120. }
  121. }
  122. }
  123. }
  124. }
  125. },
  126. "supports": {
  127. "anchor": true,
  128. "align": true,
  129. "color": {
  130. "__experimentalSkipSerialization": true,
  131. "gradients": true,
  132. "__experimentalDefaultControls": {
  133. "background": true,
  134. "text": true
  135. }
  136. },
  137. "spacing": {
  138. "margin": true,
  139. "padding": true
  140. },
  141. "typography": {
  142. "fontSize": true,
  143. "lineHeight": true,
  144. "__experimentalFontFamily": true,
  145. "__experimentalFontStyle": true,
  146. "__experimentalFontWeight": true,
  147. "__experimentalLetterSpacing": true,
  148. "__experimentalTextTransform": true,
  149. "__experimentalTextDecoration": true,
  150. "__experimentalDefaultControls": {
  151. "fontSize": true
  152. }
  153. },
  154. "__experimentalBorder": {
  155. "__experimentalSkipSerialization": true,
  156. "color": true,
  157. "style": true,
  158. "width": true,
  159. "__experimentalDefaultControls": {
  160. "color": true,
  161. "style": true,
  162. "width": true
  163. }
  164. },
  165. "__experimentalSelector": ".wp-block-table > table"
  166. },
  167. "styles": [
  168. {
  169. "name": "regular",
  170. "label": "Default",
  171. "isDefault": true
  172. },
  173. { "name": "stripes", "label": "Stripes" }
  174. ],
  175. "editorStyle": "wp-block-table-editor",
  176. "style": "wp-block-table"
  177. }