{"id":19,"date":"2025-09-26T08:50:45","date_gmt":"2025-09-26T08:50:45","guid":{"rendered":"https:\/\/ska-blocks.com\/docs\/2025\/09\/26\/attributes\/"},"modified":"2025-09-26T09:32:53","modified_gmt":"2025-09-26T09:32:53","slug":"attributes","status":"publish","type":"post","link":"https:\/\/ska-blocks.com\/docs\/attributes\/","title":{"rendered":"Attributes"},"content":{"rendered":"\n<p class=\"lead\">ska-blocks blocks, such as <a href=\"https:\/\/ska-blocks.com\/docs\/ska-blocks\/element-block\/\" data-type=\"post\" data-id=\"203\">Element<\/a> and <a href=\"https:\/\/ska-blocks.com\/docs\/ska-blocks\/text-block\/\" data-type=\"post\" data-id=\"213\">Text<\/a>, have the ability to accept custom HTML attributes:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/ska-blocks.com\/docs\/wp-content\/uploads\/sites\/3\/2024\/03\/image-103.png\" alt=\"\" class=\"wp-image-863\"\/><\/figure>\n\n\n\n<p>This allows to add things that the block editor may not support at the time, such as specifying <code>aria-<\/code> values, adding <code>data-<\/code> values, integrating with <a href=\"https:\/\/ska-blocks.com\/docs\/ska-theme\/alpine-js\/\" data-type=\"post\" data-id=\"860\">Alpine.js<\/a>, adding schema markup and more.<\/p>\n\n\n\n<p>Since attribute values can get long and it&#8217;s a little cramped in the block editor sidebar, there is a button to edit the attributes in a larger modal.<\/p>\n\n\n\n<p>The clipboard icon allows to copy current attributes, and the value can be pasted to any other block, into the &#8220;Key&#8230;&#8221; or &#8220;Value&#8230;&#8221; input field and all the attributes from the clipboard will be added.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ska-blocks blocks, such as Element and Text, have the ability to accept custom HTML attributes: This allows to add things that the block editor may not support at the time, such as specifying aria- values, adding data- values, integrating with Alpine.js, adding schema markup and more. Since attribute values can get long and it&#8217;s a&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-ska-blocks"],"_links":{"self":[{"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":1,"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":186,"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/posts\/19\/revisions\/186"}],"wp:attachment":[{"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ska-blocks.com\/docs\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}