Tutorials

/

MD Editor Element: How Do You Use It?

With the MDEditor element, you can create rich content in Markdown format and easily save your content while viewing your edits in real time thanks to the live preview.

‍

‍

The “MDEditor” element is a text editing element that allows users to create rich text content in Markdown format. It facilitates the creation of structured content by supporting Markdown syntax, such as headings, lists, bold and italic text, links, and code blocks.
In this video, we’ll explore an example of how to use this element through the “Creating Rich Content and Documentation” scenario.
First, create the “ContentBlocks” table structure on the screen.
Switch to the “UI Design” module. Drag and drop the “MDEditor” element onto your page. In the “Properties” panel, set the “Value” field to “Default” and “Empty.” Set the “Simplified” and “HideToolbar” properties to off. Add a “Button” element to the page. Type “Save” in the “Label” field. Use “Add Action” and follow the “onClick,” “ManageDB,” and “Save Record” steps to add the action. In the field that opens, select the “ContentBlocks” table you created earlier. Select all the columns that appear.
Define the “CommentText” field as “Components,” “MDEditor,” and “value.” Define the “CreatedAt” field as “Default” and “Now.” Define the “CreatedBy” field as “Default,” “User,” and “CurrentUsername”; and define the “Id” field as “Default” and “New Guid.”
When the application is tested, the content entered into the “MDEditor” field is edited on the left side and instantly displayed as a live preview on the right side. The live preview pane can be toggled on and off using the control in the upper-right corner. All Markdown features—such as text formatting, lists, links, images, quotes, and code blocks—can be easily applied within the editor, and the results can be viewed in real time. Once the content is ready, click the “Save” button to save it.