- Print
- DarkLight
- PDF
How to add accordion in Markdown?
Document360 is a powerful and flexible product that helps create a world-class knowledge base for customers and employees. It consists of three core parts: Knowledge base portal, Knowledge base site, and Knowledge base widget. Additionally, it also provides API documentation to help content producers create content quickly and easily. It simplifies the process of creating content for consumers by providing an easy-to-use interface with all the necessary tools.
If you want your content to appear as an accordion in Markdown editor based articles, there is no option to add it using a conventional tool from the menu bar or a straightforward Markdown syntax.
Use the below workaround to add an accordion efforlessly in Markdown editor.
Solution
- Go to the desired article/page and open it in the Markdown editor
- Paste the below code in the desired location where you want the accordion to appear
<details>
<summary>Accordion_name</summary>
<p>Accordion_content</p>
</details>
- Replace the
Accordion_name
text with the desired accordion title/name - Replace the
Accordion_content
text with the desired content - If you want to add headings inside the accordian you can use the Heading HTML tags (
<h2>..</h2>
,<h3>..</h3>
,<h4>..</h4>
) in theAccordion_content
sections
Heading tags can be used in the summary section of the accordian "Accordion_name
", but the text alignment might be affected.
Example
Code
<details>
<summary>What is Document360</summary>
<p>A well structured product to create a world class knowledge base for your customers and employees. Content producers get the power whereas the Content consumers get the simplicity.</p>
<h4>Core parts</h4>
<p>Knowledge base portal</p>
<p>Knowledge base site</p>
<p>Knowledge base widget</p>
<p>API documentation</p>
</details>
Output
What is Document360?
A well structured product to create a world-class knowledge base for your customers and employees. With Document360 content producers get the power and flexibility, whereas the Content consumers get the simplicity.
Core parts
Knowledge base portal
Knowledge base site
Knowledge base widget
API documentation
Note: Click the "What is Document360?" accordian above to expand/collapse it.