Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"checkdomain/holiday": "^3.0.0",
"gregwar/captcha": "^1.0",
"guzzlehttp/guzzle": "^7.2",
"michelf/php-markdown": "^2.0",
"monolog/monolog": "^2.0",
"openpsa/installer": "^1.0",
"openpsa/midgard-portable": "^1.10.0",
Expand Down Expand Up @@ -55,7 +54,8 @@
"symfony/validator": ">=6.4",
"symfony/var-dumper": ">=6.4",
"symfony/yaml": ">=6.4",
"cocur/slugify": "^4.0"
"cocur/slugify": "^4.0",
"erusev/parsedown": "^1.8"
},
"scripts": {
"post-install-cmd": [
Expand Down
4 changes: 2 additions & 2 deletions lib/midcom/admin/help/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
*/

use Michelf\MarkdownExtra;
use midgard\portable\storage\connection;

/**
Expand Down Expand Up @@ -95,7 +94,8 @@ private function _load_file(string $help_id, string $component) : ?string
public function get_help_contents(string $help_id, string $component) : ?string
{
if ($text = $this->_load_file($help_id, $component)) {
return MarkdownExtra::defaultTransform($text);
$parsedown = new Parsedown();
return $parsedown->text($text);
}
return null;
}
Expand Down
24 changes: 12 additions & 12 deletions lib/midcom/documentation/05_editing_elements.en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,16 @@ from the right-click context menu:
Depending on the level of action (single cell/table row/whole table), select the corresponding action.

* Table properties for affecting the whole table
* choose eg. the horizontal Alignment, Border width and table dimensions (Width and Height)
* choose eg. the horizontal Alignment, Border width and table dimensions (Width and Height)
* Table row properties for affecting the selected rows
* choose whether the rows represent table body, head or foot
* general alignments
* with Table row properties it is also possible to change either the currently selected rows, all the
* choose whether the rows represent table body, head or foot
* general alignments
* with Table row properties it is also possible to change either the currently selected rows, all the
rows or all the odd/even rows of the table
* Table cell properties for individual table cells
* cell specific alignments and Cell type
* cell dimensions (Width and Height)
* with Table cell properties it is also possible to change either the currently selected cells, all the
* cell specific alignments and Cell type
* cell dimensions (Width and Height)
* with Table cell properties it is also possible to change either the currently selected cells, all the
cells on the currently selected rows or every cell in the table

>Note: Many of the actions for cells and rows are the same, although some functionalities
Expand Down Expand Up @@ -211,9 +211,9 @@ appear a popup window.
Other functionalities of the image popup are

* Replace file
* replace a file that is currently on the server eg. after changes
* replace a file that is currently on the server eg. after changes
* Delete file
* delete a file from the server
* delete a file from the server

>Note: If you are using the same image many times eg. in the same folder (but not the same
>article) you can also attach the image to the folder instead of the currently edited page. To
Expand All @@ -224,9 +224,9 @@ To change the image size

* Click on the image
* There are white boxes in each of the corners and in the middle of each side
* to change the proportional size click and drag from a corner
* to change the horizontal size click and drag from the sides
* to change the vertical size click and drag from the top or bottom
* to change the proportional size click and drag from a corner
* to change the horizontal size click and drag from the sides
* to change the vertical size click and drag from the top or bottom

###Image properties

Expand Down
2 changes: 1 addition & 1 deletion lib/net/nemein/wiki/documentation/markdown.en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Markdown: Syntax
* [Automatic Links](#autolink)


* * *
---

<h2 id="overview">Overview</h2>

Expand Down
5 changes: 2 additions & 3 deletions lib/net/nemein/wiki/parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
*/

use Michelf\MarkdownExtra;

/**
* Wiki markup parser
*
Expand All @@ -27,7 +25,8 @@ public function __construct(net_nemein_wiki_wikipage $page)

public function get_html() : string
{
return MarkdownExtra::defaultTransform($this->get_markdown($this->_page->content));
$parsedown = new Parsedown();
return $parsedown->text($this->get_markdown($this->_page->content));
}

public function get_markdown(string $input) : string
Expand Down
5 changes: 3 additions & 2 deletions src/midcom/datamanager/template/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
use Symfony\Component\Form\FormView;
use midcom;
use midcom_helper_formatter;
use Michelf\MarkdownExtra;
use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
use midcom\datamanager\renderer;
use Parsedown;

class view extends base
{
Expand Down Expand Up @@ -197,7 +197,8 @@ public function text_widget(FormView $view, array $data)
return midcom_helper_formatter::format($data['value'], 'f');

case 'markdown':
return MarkdownExtra::defaultTransform($data['value']);
$parsedown = new Parsedown();
return $parsedown->text($data['value']);

case (str_starts_with($view->vars['output_mode'], 'x')):
// Run the contents through a custom formatter registered via mgd_register_filter
Expand Down