{"id":1846,"date":"2024-10-18T06:37:15","date_gmt":"2024-10-18T04:37:15","guid":{"rendered":"https:\/\/inseri.swiss\/?p=1846"},"modified":"2026-02-11T16:33:34","modified_gmt":"2026-02-11T16:33:34","slug":"share-block","status":"publish","type":"post","link":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/2024\/10\/share-block\/","title":{"rendered":"Share Block"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <strong>Share<\/strong> block enables the guests to share the state of a page with other visitors, allowing them to reproduce it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As an example we will consider the <a href=\"https:\/\/zi.uzh.ch\/whp\/science-it\/inseri\/2023\/03\/plotly-chart-block\/\" data-type=\"post\" data-id=\"360\">Plotly Chart Block<\/a> post where feel free to edit the json and select a column.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-inseri-core-text-editor\" data-attributes=\"{&quot;blockId&quot;:&quot;KaCV6b1xBVHc4v4LUH6u1&quot;,&quot;content&quot;:&quot;%7B%0A%20%20%20%20%22data%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22x%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22giraffes%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22orangutans%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22monkeys%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22y%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2020%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2014%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2023%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22bar%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%2C%0A%20%20%20%20%22layout%22%3A%7B%22height%22%3A500%7D%0A%7D&quot;,&quot;contentType&quot;:&quot;application\/json&quot;,&quot;editable&quot;:true,&quot;height&quot;:150,&quot;isVisible&quot;:true,&quot;label&quot;:&quot;Feel free to edit the JSON text below&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;textEditor&quot;}}\">is loading &#8230;<\/div>\n\n\n\n<div class=\"wp-block-inseri-core-plotly\" data-attributes=\"{&quot;blockId&quot;:&quot;hrbGpj0iDhYFnrD124Ene&quot;,&quot;height&quot;:500,&quot;inputConfig&quot;:&quot;&quot;,&quot;inputData&quot;:&quot;&quot;,&quot;inputFull&quot;:&quot;KaCV6b1xBVHc4v4LUH6u1\/content&quot;,&quot;inputLayout&quot;:&quot;&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;plotly&quot;},&quot;outputs&quot;:[[&quot;onClick&quot;,&quot;click&quot;]]}\">is loading &#8230;<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">You can try to click on one of the columns and the corresponding value will be shown dynamically below in the <strong>Text Viewer<\/strong> block (some small manipulation was done in the <strong>Python Code<\/strong> block, which runs automatically and is invisible to the visitor). Also, feel free to edit the JSON input used to generate the plot.<\/p>\n\n\n\n<div class=\"wp-block-inseri-core-python\" data-attributes=\"{&quot;autoTrigger&quot;:true,&quot;blockId&quot;:&quot;sopWCY58UGn8FxJdAvbIA&quot;,&quot;content&quot;:&quot;res%20%3D%20%7Bselected_value%5B0%5D%5B%22x%22%5D%3Aselected_value%5B0%5D%5B%22y%22%5D%7D&quot;,&quot;editable&quot;:false,&quot;height&quot;:63,&quot;inputCode&quot;:&quot;&quot;,&quot;inputs&quot;:{&quot;selected_value&quot;:&quot;hrbGpj0iDhYFnrD124Ene\/onClick&quot;},&quot;isVisible&quot;:false,&quot;label&quot;:&quot;&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;python&quot;},&quot;mode&quot;:&quot;editor&quot;,&quot;outputs&quot;:[[&quot;res&quot;,&quot;application\/json&quot;]]}\">is loading &#8230;<\/div>\n\n\n\n<div class=\"wp-block-inseri-core-text-viewer\" data-attributes=\"{&quot;blockId&quot;:&quot;FDCPJq1oSMjVGD5MHLfzq&quot;,&quot;content&quot;:&quot;&quot;,&quot;height&quot;:60,&quot;inputKey&quot;:&quot;sopWCY58UGn8FxJdAvbIA\/res&quot;,&quot;label&quot;:&quot;Selected Column and the corresponding value&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;textViewer&quot;}}\">is loading &#8230;<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">By clicking on the Share button below, the URL containing all your edits and the selection will be copied to the clipboard. You can open a new browser and paste the URL, or share it with somebody else. <\/p>\n\n\n\n<div class=\"wp-block-inseri-core-share\" data-attributes=\"{&quot;blockId&quot;:&quot;rhALuaQzmpKqAcWnwZTCe&quot;,&quot;copiedText&quot;:&quot;Copied&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;share&quot;},&quot;showIcon&quot;:true,&quot;text&quot;:&quot;Share&quot;}\">is loading &#8230;<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Otherwise please open this <a href=\"https:\/\/zi.uzh.ch\/whp\/science-it\/inseri\/2024\/10\/share-block\/#{&quot;KaCV6b1xBVHc4v4LUH6u1&quot;:{&quot;code&quot;:&quot;{\\n    \\&quot;data\\&quot;: [\\n        {\\n            \\&quot;x\\&quot;: [\\n                \\&quot;giraffes\\&quot;,\\n                \\&quot;orangutans\\&quot;,\\n                \\&quot;monkeys\\&quot;\\n            ],\\n            \\&quot;y\\&quot;: [\\n                20,\\n                10,\\n                5\\n            ],\\n            \\&quot;type\\&quot;: \\&quot;bar\\&quot;\\n        }\\n    ],\\n    \\&quot;layout\\&quot;:{\\&quot;height\\&quot;:500}\\n}&quot;},&quot;hrbGpj0iDhYFnrD124Ene&quot;:{&quot;click&quot;:[{&quot;curveNumber&quot;:0,&quot;data&quot;:{&quot;x&quot;:[&quot;giraffes&quot;,&quot;orangutans&quot;,&quot;monkeys&quot;],&quot;y&quot;:[20,10,5],&quot;type&quot;:&quot;bar&quot;},&quot;x&quot;:&quot;orangutans&quot;,&quot;y&quot;:10,&quot;pointIndex&quot;:1}],&quot;hover&quot;:null}}\" target=\"_blank\" rel=\"noreferrer noopener\">this link<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more details please see the corresponding&nbsp;<a href=\"https:\/\/inseri-swiss.github.io\/inseri-core-wp\/blocks\/share\/\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-f56f613f wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-inseri-core-export alignright\" data-attributes=\"{&quot;align&quot;:&quot;right&quot;,&quot;blockId&quot;:&quot;vaxQQCzmrnvQCf4meQgfk&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;export&quot;},&quot;postId&quot;:1846}\">is loading &#8230;<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Share block enables the guests to share the state of a page with other visitors, allowing them to reproduce it. As an example we will consider the Plotly Chart Block post where feel free to edit the json and select a column. You can try to click on one of the columns and the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[40,47,48,50,52,53],"class_list":["post-1846","post","type-post","status-publish","format-standard","hentry","category-inseri-core-block","tag-export","tag-plotly-chart","tag-python-code","tag-share","tag-text-editor","tag-text-viewer"],"_links":{"self":[{"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/posts\/1846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/comments?post=1846"}],"version-history":[{"count":1,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/posts\/1846\/revisions"}],"predecessor-version":[{"id":2088,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/posts\/1846\/revisions\/2088"}],"wp:attachment":[{"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/media?parent=1846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/categories?post=1846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zi.uzh.ch\/whp\/science-it\/inseri\/wp-json\/wp\/v2\/tags?post=1846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}