User Tools

Site Tools


processwire:markdown

tentative 1

  1. Modules → Refresh
  2. Modules → Install → InputFieldAceEditor
  3. Setup → Fields → add new
  4. Field Setup
    1. basic : textarea
    2. details : html entity encoders (htmlspecialchars), inputfield type : AceEditor, content type : Markup/HTML with image management
front

on dirait qu'il y a par défaut un parser markdown : TextformatterMarkdownExtra

info ici : https://github.com/ryancramerdesign/ProcessWire/tree/master/wire/modules/Textformatter/TextformatterMarkdownExtra/parsedown-extra

Et là : https://github.com/erusev/parsedown-extra/wiki

<?php
// includes
$markdown_module_path = "../../wire/modules/Textformatter/TextformatterMarkdownExtra/";
require $markdown_module_path."parsedown/Parsedown.php";
require $markdown_module_path."parsedown-extra/ParsedownExtra.php";
// declaring parser
$Extra = new ParsedownExtra();
//use
$page->of(false);
echo $Extra->text($page->Markdown); ?>
processwire/markdown.txt · Last modified: 2016/02/08 15:36 by leo