{"id":16,"date":"2024-08-17T20:06:30","date_gmt":"2024-08-17T19:06:30","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/?page_id=16"},"modified":"2024-09-21T20:40:31","modified_gmt":"2024-09-21T19:40:31","slug":"custom-html","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/home\/custom-html\/","title":{"rendered":"Custom HTML"},"content":{"rendered":"\n<p>The custom HTML widget allows you to add html code to a widget. It has syntax highlighting, auto-complete and error detection.<\/p>\n\n\n\n<p>Note: Javascript will be removed automatically from widgets when they are saved. This means if you try to use code provided that includes Javascript it will be removed.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/glowbloghelp\/uploads\/sites\/2545\/2017\/12\/customhtml.gif\" alt=\"Gif showing editing of Custom HTML widget\" class=\"wp-image-2640\" \/><\/figure><\/div>\n\n\n<p>This widget can be useful for services that allow provide html fragments to embed content. For example the Widget visible on this page is from clustermaps and shows the number of visitors.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;a href=\"https:\/\/clustrmaps.com\/site\/1c0w8\"  title=\"Visit tracker\"&gt;&lt;img src=\"\/\/www.clustrmaps.com\/map_v2.png?d=1ge4j7IhLgo2HYiqWwmhoW3YOkzwgF4hgwu10khPSIM&amp;cl=ffffff\" \/&gt;&lt;\/a&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Block Editor<\/h2>\n\n\n\n<p>You can use Custom HTML block in the block editor too, here is a gif and below the results of the block:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"600\" data-attachment-id=\"46\" data-permalink=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/home\/custom-html\/customhtmlwidget\/\" data-orig-file=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/widgets\/uploads\/sites\/10674\/2024\/08\/25115146\/CustomHTMLWidget.gif\" data-orig-size=\"800,600\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CustomHTMLWidget\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/widgets\/uploads\/sites\/10674\/2024\/08\/25115146\/CustomHTMLWidget-300x225.gif\" data-large-file=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/widgets\/uploads\/sites\/10674\/2024\/08\/25115146\/CustomHTMLWidget.gif\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/widgets\/uploads\/sites\/10674\/2024\/08\/25115146\/CustomHTMLWidget.gif\" alt=\"Animation of the Custom HTML WordPress block.\" class=\"wp-image-46\" \/><\/figure><\/div>\n\n\n<strong>The Custom HTML<\/strong> block can be used in posts or pages, you can also write html in the Text View of the classic editor.\n","protected":false},"excerpt":{"rendered":"<p>The custom HTML widget allows you to add html code to a widget. It has syntax highlighting, auto-complete and error detection. Note: Javascript will be removed automatically from widgets when they are saved. This means if you try to use code provided that includes Javascript it will be removed. This widget can be useful for &hellip; <a href=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/home\/custom-html\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Custom HTML&#8221;<\/span><\/a><\/p>\n","protected":false},"author":22,"featured_media":0,"parent":8,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-16","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/pages\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":6,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/pages\/16\/revisions"}],"predecessor-version":[{"id":180,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/pages\/16\/revisions\/180"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/pages\/8"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/widgets\/wp-json\/wp\/v2\/media?parent=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}