An inputfield module that brings EasyMDE Markdown editor to ProcessWire.
EasyMDE is a fork of SimpleMDE, for which there is an existing PW module. Inputfield EasyMDE has a few advantages though:
EasyMDE seems to be more actively developed than SimpleMDE, which hasn't seen any updates for several years.
You can define options for Inputfield EasyMDE.
Inputfield EasyMDE can be used in Repeater fields and in custom fields for File/Image fields.
Inputfield EasyMDE
EasyMDE (Easy Markdown Editor) as an inputfield for ProcessWire.
EasyMDE is a Markdown editor with some nice features, allowing users who may be less experienced with Markdown to use familiar toolbar buttons and shortcuts. More information is at the EasyMDE website.
Installation
Install the Inputfield EasyMDE module.
Usage
Create a new textarea field, and in the "Inputfield Type" dropdown choose "EasyMDE". Save the field and if you like you can then configure the EasyMDE options for the field as described below.
To convert Markdown to HTML you can install the core TextformatterMarkdownExtra module and apply the textformatter to the field. Alternatively you can use $sanitizer->entitiesMarkdown() on the field value, e.g.
echo $sanitizer->entitiesMarkdown($page->your_field_name, ['fullMarkdown' => true]);
Configuration
On the "Input" tab of the field settings you can define EasyMDE options for the field in JSON format. Refer to the EasyMDE documentation for the available options. Keys in the JSON must be surrounded with double quotes.
Example:
"toolbar": ["bold", "italic", "heading", "|", "side-by-side"],
"sideBySideFullscreen": false
https://github.com/Toutouwai/InputfieldEasyMDE https://processwire.com/modules/inputfield-easy-mde/