AnQiCMS's Markdown editor brings great convenience and powerful expressiveness to content creation.It is not just a text input box, but also an intelligent tool that can structure and visualize complex information, aiming to help users build high-quality content more efficiently and intuitively.
On the basis of Markdown syntax support, AnQiCMS follows the mainstream standards and provides comprehensive functions, allowing users to focus on the content itself without having to pay too much attention to formatting details. You can easily use the hashtag#Create headings at various levels, using asterisks*Or hyphens-Define ordered or unordered lists, you can also use asterisks*or an underscore_To markBoldEnglish*italic*text.Inserting hyperlinks and images is also very simple, just follow the intuitive syntax of Markdown.` ``来创建行内代码,或者利用三反引号`Create code blocks to ensure that your code is clear and readable.
Especially worth mentioning is that AnQiCMS's Markdown editor is forGitHub Flavored Markdown (GFM)Standard good support, further expands the expression of content. This means you can easily create complex tables, through the pipe character|and hyphen-can draw neat rows and columns; you can also add a checklisttask listto easily track tasks; use double waves~~It is also very easy to mark text with a strikethrough. These extended features make your content structure more rich and information delivery more efficient.
In addition to basic syntax and GFM extensions, AnQiCMS's Markdown editor also provides two powerful advanced features, allowing your content to bid farewell to boredom and embrace visualization:
Say goodbye to boredom, embrace visualization: Markdown extended features
Mathematical formula support (based on MathJax)For technology and educational content that requires displaying professional mathematical formulas, AnQiCMS's Markdown editor provides powerfulMathematical formulaSupport.Using the MathJax library, you can directly write LaTeX or MathML syntax in the content to express complex mathematical expressions, chemical equations, or physical formulas.
$$E=mc^2$$Such LaTeX syntax, the system can render it into beautiful mathematical symbols. This greatly simplifies the input and display process of formulas, making your professional content more readable.Flowchart and Chart Support (based on Mermaid)Except for mathematical formulas,Flowcharts and various chartsIt is also a tool for expressing complex concepts.AnQiCMS integrated with Mermaid chart syntax, allowing you to generate exquisite flowcharts, sequence diagrams, Gantt charts, and more without the need for external drawing tools, directly by describing with code.For example, through simple text descriptions, you can draw a clear user login flowchart or a project Gantt chart.This 'code as chart' approach not only improves content creation efficiency, but also makes chart modification and version management more convenient.
Content rendering and frontend display mechanism
Understood the power of Markdown syntax, next is how the content is presented on the website front end.When you enable the Markdown editor in the AnQiCMS background, the system will automatically convert it to standard HTML after content publishing, so that it can be displayed normally in the browser.This is a seamless process, usually requiring no manual intervention.
However, for dynamic rendering extensions such as MathJax mathematical formulas and Mermaid charts, they need to rely on front-end JavaScript libraries to complete the final display.Therefore, merely entering the corresponding syntax in the editor is not enough; you also need to make simple configurations in your website template files and include the CDN resources of these external libraries.<script>Tags added to the template.<head>or<body>Area. If these scripts fail to load correctly, the formulas and charts will not display properly, and you may only see the original text code.
It is worth noting that AnQiCMS also provides flexible rendering control. For example, in template tags, you can usearchiveDetailWhen getting document content, you can addrender=trueParameters to explicitly indicate that the system should render Markdown content as HTML, or throughrender=falseThe parameter skips rendering and directly displays the original Markdown text. This provides developers with more fine-grained control capabilities to meet different display requirements.
In short, AnQiCMS's Markdown editor provides a comprehensive and expressive creation platform for users with its deep support for basic Markdown syntax, GitHub Flavored Markdown, and extensions such as MathJax, Mermaid, etc.Whether it is daily articles, technical documents, or teaching content, it can be presented in a more efficient and intuitive way, greatly enhancing the quality of content and user experience.
Common Questions and Answers (FAQ)
How to enable Markdown editor in AnQiCMS backend?You can navigate to 'Global Settings' -> 'Content Settings' in the AnQiCMS backend to find the option to enable Markdown editor.Check and save the settings, and then you can use Markdown syntax for content creation when publishing or editing articles.
Why do my mathematical formulas or flowcharts not display on the front-end page but only show the code?This is usually because MathJax and Mermaid, the JavaScript libraries used for rendering formulas and charts, have not been loaded correctly on your front-end page. You need to follow the instructions in the AnQiCMS help document to include the CDN reference code for MathJax and Mermaid.
<script>Label) add to your website template file.<head>Ensure that these scripts can be accessed and executed by the browser, so that the formulas and chart code in Markdown can be converted into visual content.Can the HTML content generated by the Markdown editor be displayed as raw Markdown text in the template instead of rendered HTML?Yes, AnQiCMS offers this flexibility. In your template files, when using such tags to call content, you can add parameters in the following way
archiveDetailto call content, you can add parameters in the following wayrender=falsefor example{% archiveDetail articleContent with name="Content" render=false %}This will allow you to retrieve and display the unrendered original Markdown text.