Enable Markdowns in Fields
Overview
This article introduces how to enable markdowns in fields of Kintone Apps.
Sample Image
Users can type text into fields of Kintone using the markdown syntax. When the record is added and the Record Details page is displayed, the text is displayed in a markdown style.
Prepare the App
Create the Form
Create an App with the following field and settings. Save the form when finished.
Field Type | Field Name | Field Code / Element ID |
---|---|---|
Date | Date | Date |
Text | Title | Title |
User selection | Participants | Participants |
Text area | Contents | Contents |
Blank space | - | markdown-display |
The form should look like the following:
Set the Libraries
This sample uses Marked v4.0.12 and github-markdown-css . Set the following URL and file into the App's JavaScript and CSS Customization settings .
- https://js.kintone.com/markedjs/v4.0.12/marked.min.js
- gitHub-markdown.css
Sample Code
Prepare the following JavaScript code in a text editor and navigate to the Kintone App's settings. Upload the file into the Upload JavaScript for PC option of the JavaScript and CSS Customization settings .
|
|
After saving the settings and clicking on Update App, add a new record. Fill the Text area with some markdown syntax. After saving the record, the Text Area field should become hidden. The markdown contents of the Text Area field should then be displayed where the Blank space field is placed.