When managing content in AnQiCMS, flexibly choosing a handy editing tool can greatly enhance your content creation.The Markdown editor is favored by many content creators for its concise syntax and support for specific advanced features such as mathematical formulas and flowcharts.AnQiCMS as a system committed to providing an efficient and customizable content management solution naturally considers this point, allowing you to easily enable or disable the Markdown editor feature according to your actual needs.
Easily switch: Enable or disable the Markdown editor feature
To enable or disable the Markdown editor on the AnQiCMS backend, the entire process is very intuitive. You just need to follow a few simple steps to complete this operation:
First, please log in to the AnQiCMS admin interface using the admin account.After logging in, you will see a series of feature options in the navigation menu on the left.Please find and click on the quotation markBackend settingsThis item.
In the expanded submenu of "Background Settings", you will see "Content settings" options. Click to enter the "Content Settings" page, where a variety of configurations related to content publishing and display are gathered.
In the "Content Settings" page, browse through the various configurations, and you will find one named "Enable Markdown editor?The option. This option is usually presented with a switch or checkbox.
If you want to write articles in Markdown, just turn the switch to the “enabled”status (or check the checkbox). On the other hand, if you are more accustomed to the traditional rich text editor (WYSIWYG mode), then set it to “disableStatus (or uncheck).
After completing the selection, please click on the bottom of the page."),SaveClick the button to make sure your settings take effect. The system will automatically switch the content editor type after you save.This means that when you next enter the "Add Document" or "Edit Document" page, you will see the corresponding editor interface.
Understand the impact of the Markdown editor switch.
After successfully switching to the editor, it is very helpful to understand its specific impact on content management and display:
After you enable the Markdown editorWhen you publish or edit an article, the content input box will become a text area that supports Markdown syntax.You can use Markdown's concise syntax to format text, insert images, create lists, and more.At this time, AnQiCMS will automatically recognize and convert its content into HTML format that browsers can recognize, so that it can be displayed normally on the front page.This is a very practical feature for users who want to use Markdown to write mathematical formulas or draw flowcharts, it can greatly enhance the professionalism and diversity of content expression.
When you disable the Markdown editorThe system will switch back to the AnQiCMS default rich text editor.This editor provides an interface similar to Word, you can complete operations such as bold, italic, insert images, etc. by clicking buttons, without needing to memorize complex Markdown syntax.
It is worth noting that AnQiCMS is very intelligent in handling content rendering. Even if you disable the Markdown editor, for thoseThe content that has already been written and saved using Markdown syntax, AnQiCMS default template tags (such asarchiveDetail/pageDetailetc. are provided when callingContentfields) also provides arenderParameter. This means that even if the Markdown editor is disabled, you can still add extra in the template by callingContentthe field with an extrarender=trueParameters (for example{% archiveDetail archiveContent with name="Content" render=true %}{{archiveContent|safe}}) To force the system to convert Markdown content to HTML and display it. This provides you with great flexibility, ensuring the compatibility and sustainability of your website content.
Extend the application: make Markdown content more exciting on the front end
Enable Markdown editor is just the first step. If you use advanced Markdown features like mathematical formulas or flowcharts in the content, you may also find that they are not displayed as expected on the website front end.This is because, to correctly render these special elements, it usually requires the front-end page to introduce additional CSS styles and JavaScript libraries to support.
AnQiCMS's Markdown feature takes this into consideration, allowing you to freely integrate third-party frontend libraries to enhance the display effect. For example, you can refer to the relevant documentation in the front-end template files (usuallybase.htmlthe file<head>Part) introduces something likegithub-markdown-cssUsed for basic Markdown styling, as well asMathJaxandMermaidThis kind of JavaScript library is specifically used for rendering mathematical formulas and flowcharts.
By such settings, your Markdown content can not only be easily edited in the background, but also presented to visitors on the front page in a professional and beautiful way, truly bringing out the full potential of the Markdown editor.
Frequently Asked Questions (FAQ)
1. What will happen to the content published using the rich text editor if I enable the Markdown editor?
After you switch to the Markdown editor, the content of the articles published with the rich text editor will not be affected, and they will still be displayed in HTML format.The article you publish or edit an old article in the Markdown editor will be saved in Markdown syntax and automatically rendered into HTML on the front end by AnQiCMS.
2. I enabled the Markdown editor and wrote mathematical formulas or flowcharts in the article, but why are they not displayed normally on the front page?
The Markdown editor itself is responsible for helping you write content using Markdown syntax in the background. However, for the correct display of complex elements such as mathematical formulas or flowcharts, your website's front-end page needs to load the corresponding CSS styles and JavaScript libraries. You need to follow the document instructions of AnQiCMS, usually in your template file (usuallybase.htmlIntroduce the corresponding CDN resources, for examplegithub-markdown-css/MathJaxandMermaidSo that these advanced features can be rendered normally on the front end
3. Does AnQi CMS support the use of two different editors simultaneously, such as some articles using Markdown and others using rich text?
AnQiCMS backend can only enable one editor at a time under the same content model.That is to say, you cannot simultaneously allow a part of the 'article' model's content to use Markdown editor and another part to use rich text editor.You need to switch globally through the 'Content Settings' page.However, even if you switch back to the rich text editor, the content written in Markdown can still be added in the template byrender=trueParameters to ensure their normal display.