You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

211 lines
4.2 KiB

1 year ago
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 3,
  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. "colspan": {
  52. "type": "string",
  53. "source": "attribute",
  54. "attribute": "colspan"
  55. },
  56. "rowspan": {
  57. "type": "string",
  58. "source": "attribute",
  59. "attribute": "rowspan"
  60. }
  61. }
  62. }
  63. }
  64. },
  65. "body": {
  66. "type": "array",
  67. "default": [],
  68. "source": "query",
  69. "selector": "tbody tr",
  70. "query": {
  71. "cells": {
  72. "type": "array",
  73. "default": [],
  74. "source": "query",
  75. "selector": "td,th",
  76. "query": {
  77. "content": {
  78. "type": "string",
  79. "source": "html"
  80. },
  81. "tag": {
  82. "type": "string",
  83. "default": "td",
  84. "source": "tag"
  85. },
  86. "scope": {
  87. "type": "string",
  88. "source": "attribute",
  89. "attribute": "scope"
  90. },
  91. "align": {
  92. "type": "string",
  93. "source": "attribute",
  94. "attribute": "data-align"
  95. },
  96. "colspan": {
  97. "type": "string",
  98. "source": "attribute",
  99. "attribute": "colspan"
  100. },
  101. "rowspan": {
  102. "type": "string",
  103. "source": "attribute",
  104. "attribute": "rowspan"
  105. }
  106. }
  107. }
  108. }
  109. },
  110. "foot": {
  111. "type": "array",
  112. "default": [],
  113. "source": "query",
  114. "selector": "tfoot tr",
  115. "query": {
  116. "cells": {
  117. "type": "array",
  118. "default": [],
  119. "source": "query",
  120. "selector": "td,th",
  121. "query": {
  122. "content": {
  123. "type": "string",
  124. "source": "html"
  125. },
  126. "tag": {
  127. "type": "string",
  128. "default": "td",
  129. "source": "tag"
  130. },
  131. "scope": {
  132. "type": "string",
  133. "source": "attribute",
  134. "attribute": "scope"
  135. },
  136. "align": {
  137. "type": "string",
  138. "source": "attribute",
  139. "attribute": "data-align"
  140. },
  141. "colspan": {
  142. "type": "string",
  143. "source": "attribute",
  144. "attribute": "colspan"
  145. },
  146. "rowspan": {
  147. "type": "string",
  148. "source": "attribute",
  149. "attribute": "rowspan"
  150. }
  151. }
  152. }
  153. }
  154. }
  155. },
  156. "supports": {
  157. "anchor": true,
  158. "align": true,
  159. "color": {
  160. "__experimentalSkipSerialization": true,
  161. "gradients": true,
  162. "__experimentalDefaultControls": {
  163. "background": true,
  164. "text": true
  165. }
  166. },
  167. "spacing": {
  168. "margin": true,
  169. "padding": true,
  170. "__experimentalDefaultControls": {
  171. "margin": false,
  172. "padding": false
  173. }
  174. },
  175. "typography": {
  176. "fontSize": true,
  177. "lineHeight": true,
  178. "__experimentalFontFamily": true,
  179. "__experimentalFontStyle": true,
  180. "__experimentalFontWeight": true,
  181. "__experimentalLetterSpacing": true,
  182. "__experimentalTextTransform": true,
  183. "__experimentalTextDecoration": true,
  184. "__experimentalDefaultControls": {
  185. "fontSize": true
  186. }
  187. },
  188. "__experimentalBorder": {
  189. "__experimentalSkipSerialization": true,
  190. "color": true,
  191. "style": true,
  192. "width": true,
  193. "__experimentalDefaultControls": {
  194. "color": true,
  195. "style": true,
  196. "width": true
  197. }
  198. },
  199. "__experimentalSelector": ".wp-block-table > table"
  200. },
  201. "styles": [
  202. {
  203. "name": "regular",
  204. "label": "Default",
  205. "isDefault": true
  206. },
  207. { "name": "stripes", "label": "Stripes" }
  208. ],
  209. "editorStyle": "wp-block-table-editor",
  210. "style": "wp-block-table"
  211. }