<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Embed a module into blog text in Blog, Website &amp; Page Publishing</title>
    <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402560#M4350</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/156719"&gt;@NM4&lt;/a&gt;&amp;nbsp;The usage snippet is for placing modules into coded templates and cannot be used in rich text. Also, blogs currently don't support drag and drop&amp;nbsp;or flex columns (though they are working on adding this&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/HubSpot-Ideas/Flexible-Column-in-Blog-Posts/idi-p/20603" target="_blank"&gt;https://community.hubspot.com/t5/HubSpot-Ideas/Flexible-Column-in-Blog-Posts/idi-p/20603&lt;/A&gt;) so at this time the only way you'd be able to add this module to your blog post is by adding it directly to the template in the design manager.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Jan 2021 01:02:34 GMT</pubDate>
    <dc:creator>alyssamwilie</dc:creator>
    <dc:date>2021-01-24T01:02:34Z</dc:date>
    <item>
      <title>Embed a module into blog text</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402337#M4348</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have created a module that works as an accordion. (&lt;A href="https://codepen.io/pen?template=mdrYeqg" target="_blank"&gt;https://codepen.io/pen?template=mdrYeqg&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-01-22 at 2.03.35 PM.png" style="width: 308px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/36863i8199EC95D6FB3442/image-dimensions/308x127?v=v2" width="308" height="127" role="button" title="Screen Shot 2021-01-22 at 2.03.35 PM.png" alt="Screen Shot 2021-01-22 at 2.03.35 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I want to put this module inbetween the text on my blog.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-01-22 at 2.04.52 PM.png" style="width: 312px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/36864i6665EBC62DE0F6DD/image-dimensions/312x132?v=v2" width="312" height="132" role="button" title="Screen Shot 2021-01-22 at 2.04.52 PM.png" alt="Screen Shot 2021-01-22 at 2.04.52 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How do I go about doing this.&lt;/P&gt;&lt;P&gt;I tried taking the usage snippet and embedding it into the text but that didnt work.&lt;/P&gt;&lt;P&gt;Please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 14:06:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402337#M4348</guid>
      <dc:creator>NM4</dc:creator>
      <dc:date>2021-01-22T14:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Embed a module into blog text</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402560#M4350</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/156719"&gt;@NM4&lt;/a&gt;&amp;nbsp;The usage snippet is for placing modules into coded templates and cannot be used in rich text. Also, blogs currently don't support drag and drop&amp;nbsp;or flex columns (though they are working on adding this&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/HubSpot-Ideas/Flexible-Column-in-Blog-Posts/idi-p/20603" target="_blank"&gt;https://community.hubspot.com/t5/HubSpot-Ideas/Flexible-Column-in-Blog-Posts/idi-p/20603&lt;/A&gt;) so at this time the only way you'd be able to add this module to your blog post is by adding it directly to the template in the design manager.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 01:02:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402560#M4350</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2021-01-24T01:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Embed a module into blog text</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402727#M4352</link>
      <description>&lt;P&gt;Thanks for the response &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;&amp;nbsp;, I managed to embed it into the css and its looks great! One questions though, im not great with CSS so hopefully you can help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-01-25 at 1.01.12 PM.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/36922i1038DD062C16E8CC/image-size/small?v=v2&amp;amp;px=200" role="button" title="Screen Shot 2021-01-25 at 1.01.12 PM.png" alt="Screen Shot 2021-01-25 at 1.01.12 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It works well on desktop, being able to cick on any part of the row and the accordion opens. But on mobile it takes up the entire page, and when trying to scroll down it is very annoying. So, how do I edit the css to make the text the only clickable part?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 13:03:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402727#M4352</guid>
      <dc:creator>NM4</dc:creator>
      <dc:date>2021-01-25T13:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Embed a module into blog text</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402795#M4353</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/156719"&gt;@NM4&lt;/a&gt;&amp;nbsp;, the clicking functionality would actually be taking place in the javascript. Would it be possible for you to paste the HTML and JS code from the module here? That would make it easier to give you exact instructions for updating it.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 15:00:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402795#M4353</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2021-01-25T15:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Embed a module into blog text</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402805#M4354</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Here is the java,&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//uses classList, setAttribute, and querySelectorAll
//if you want this to work in IE8/9 youll need to polyfill these
(function(){
	var d = document,
	accordionToggles = d.querySelectorAll('.js-accordionTrigger'),
	setAria,
	setAccordionAria,
	switchAccordion,
  touchSupported = ('ontouchstart' in window),
  pointerSupported = ('pointerdown' in window);
  
  skipClickDelay = function(e){
    e.preventDefault();
    e.target.click();
  }

		setAriaAttr = function(el, ariaType, newProperty){
		el.setAttribute(ariaType, newProperty);
	};
	setAccordionAria = function(el1, el2, expanded){
		switch(expanded) {
      case "true":
      	setAriaAttr(el1, 'aria-expanded', 'true');
      	setAriaAttr(el2, 'aria-hidden', 'false');
      	break;
      case "false":
      	setAriaAttr(el1, 'aria-expanded', 'false');
      	setAriaAttr(el2, 'aria-hidden', 'true');
      	break;
      default:
				break;
		}
	};
//function
switchAccordion = function(e) {
  console.log("triggered");
	e.preventDefault();
	var thisAnswer = e.target.parentNode.nextElementSibling;
	var thisQuestion = e.target;
	if(thisAnswer.classList.contains('is-collapsed')) {
		setAccordionAria(thisQuestion, thisAnswer, 'true');
	} else {
		setAccordionAria(thisQuestion, thisAnswer, 'false');
	}
  	thisQuestion.classList.toggle('is-collapsed');
  	thisQuestion.classList.toggle('is-expanded');
		thisAnswer.classList.toggle('is-collapsed');
		thisAnswer.classList.toggle('is-expanded');
 	
  	thisAnswer.classList.toggle('animateIn');
	};
	for (var i=0,len=accordionToggles.length; i&amp;lt;len; i++) {
		if(touchSupported) {
      accordionToggles[i].addEventListener('touchstart', skipClickDelay, false);
    }
    if(pointerSupported){
      accordionToggles[i].addEventListener('pointerdown', skipClickDelay, false);
    }
    accordionToggles[i].addEventListener('click', switchAccordion, false);
  }
})();&lt;/LI-CODE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and the html:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="accordion"&amp;gt;
&amp;lt;dl&amp;gt;
&amp;lt;dt&amp;gt;&amp;lt;a href="#accordion1" aria-expanded="false" aria-controls="accordion1" class="accordion-title accordionTitle js-accordionTrigger"&amp;gt;＋ What is Last Free Day (LFD)?&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;
&amp;lt;dd id="accordion1" class="accordion-content accordionItem is-collapsed" aria-hidden="true"&amp;gt;
&amp;lt;p&amp;gt;The last day of uncharged storage time for a container to clear customs and be picked up from the terminal (varies by terminal, carrier, and forwarder).&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Also, the last day of uncharged use of a container.&amp;lt;/p&amp;gt;
&amp;lt;/dd&amp;gt;
&amp;lt;dt&amp;gt;&amp;lt;a href="#accordion2" aria-expanded="false" aria-controls="accordion2" class="accordion-title accordionTitle js-accordionTrigger"&amp;gt; ＋ What is Demurrage?&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;
&amp;lt;dd id="accordion2" class="accordion-content accordionItem is-collapsed" aria-hidden="true"&amp;gt;
&amp;lt;p&amp;gt;Storage charge by the equipment owner (typically the carrier) for containers remaining at the terminal after the last free day. Charges per day generally increase over time.&amp;lt;/p&amp;gt;
&amp;lt;/dd&amp;gt;
&amp;lt;dt&amp;gt;&amp;lt;a href="#accordion3" aria-expanded="false" aria-controls="accordion3" class="accordion-title accordionTitle js-accordionTrigger"&amp;gt; ＋ What is Port Storage?&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;
&amp;lt;dd id="accordion3" class="accordion-content accordionItem is-collapsed" aria-hidden="true"&amp;gt;
&amp;lt;p&amp;gt;Similar to demurrage but charged by the terminal instead of the equipment owner. A container in a shipment can incur all of demurrage, &amp;lt;a href="https://www.shippingandfreightresource.com/difference-between-storage-and-demurrage/"&amp;gt;port storage&amp;lt;/a&amp;gt; and detention charges.&amp;lt;/p&amp;gt;
&amp;lt;/dd&amp;gt;
&amp;lt;dt&amp;gt;&amp;lt;a href="#accordion3" aria-expanded="false" aria-controls="accordion3" class="accordion-title accordionTitle js-accordionTrigger"&amp;gt; ＋ What is Detention/Per Diem?&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;
&amp;lt;dd id="accordion3" class="accordion-content accordionItem is-collapsed" aria-hidden="true"&amp;gt;
&amp;lt;p&amp;gt;Usage charge by the equipment owner (typically the carrier) for late return of containers.&amp;lt;/p&amp;gt;
&amp;lt;/dd&amp;gt;
&amp;lt;dt&amp;gt;&amp;lt;a href="#accordion3" aria-expanded="false" aria-controls="accordion3" class="accordion-title accordionTitle js-accordionTrigger"&amp;gt; ＋ What is Trucker Detention?&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;
&amp;lt;dd id="accordion3" class="accordion-content accordionItem is-collapsed" aria-hidden="true"&amp;gt;
&amp;lt;p&amp;gt;Another form of detention, being an hourly rate fee applied by trucking companies after a given free time for loading or unloading at pickup or delivery.&amp;lt;/p&amp;gt;
&amp;lt;/dd&amp;gt;
&amp;lt;dt&amp;gt;&amp;lt;a href="#accordion3" aria-expanded="false" aria-controls="accordion3" class="accordion-title accordionTitle js-accordionTrigger"&amp;gt; ＋ What is Pre-pulling?&amp;lt;/a&amp;gt;&amp;lt;/dt&amp;gt;
&amp;lt;dd id="accordion3" class="accordion-content accordionItem is-collapsed" aria-hidden="true"&amp;gt;
&amp;lt;p&amp;gt;A charge for storing a container at a yard, typically near the port or importer’s distribution center. The storage charge (also known as ground or quay rent) is cheaper than port storage or demurrage but will not avoid detention fees.&amp;lt;/p&amp;gt;
&amp;lt;/dd&amp;gt;
&amp;lt;/dl&amp;gt;
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 15:10:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402805#M4354</guid>
      <dc:creator>NM4</dc:creator>
      <dc:date>2021-01-25T15:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Embed a module into blog text</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402818#M4355</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/156719"&gt;@NM4&lt;/a&gt;&amp;nbsp;Hmm, wasn't expecting it to be set up the way it is, but if you remove the js-accordionTrigger class from the accordion titles and instead put it in a span around the text that should change it to have only the text clickable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;dt&amp;gt;
  &amp;lt;a href="#accordion1" aria-expanded="false" aria-controls="accordion1" class="accordion-title accordionTitle"&amp;gt;
    &amp;lt;span class="js-accordionTrigger"&amp;gt;＋ What is Last Free Day (LFD)?&amp;lt;/span&amp;gt;
  &amp;lt;/a&amp;gt;
&amp;lt;/dt&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and since we've moved it a layer in we'll want to add a parentNode property to the thisAnswer/thisQuestion variables in the javascript so it's still locating the correct elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;var thisAnswer = e.target.parentNode.parentNode.nextElementSibling;
var thisQuestion = e.target.parentNode;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 15:21:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402818#M4355</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2021-01-25T15:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Embed a module into blog text</title>
      <link>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402883#M4357</link>
      <description>&lt;P&gt;Almost&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;&amp;nbsp;! It works like I want it to thanks! However, when clicking on the box its moves the page down to where the child node would be. How do I fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I just added the '+' symbol before the text, where do I add it in the css to make it show up before the text rather than in it?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 17:12:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Embed-a-module-into-blog-text/m-p/402883#M4357</guid>
      <dc:creator>NM4</dc:creator>
      <dc:date>2021-01-25T17:12:49Z</dc:date>
    </item>
  </channel>
</rss>

