Questions tagged [parsedown]

Parsedown is a fast and extensible Markdown parser in PHP.

Parsedown is a Markdown parser in PHP.

27 questions
0
votes
2 answers

Use parsedown classes static

On my code I use all my classes static like: Parsedown::text('text'); and if I try to use it like that it gives me an error message "Using $this when not in object context ", but I can't figure out how to use Parsedown like this cause I can only use…
Alexandru
  • 45
  • 5
0
votes
1 answer

Trying to submit a HTML form to itself using PHP and JS and it's not working

I'm trying to make a form for posting articles to a news page using PHP. The goal is to write these articles in Markdown, store them in a database and parse them with Parsedown before displaying. One idea I had was to add a Preview button that POSTs…
Trobador
  • 13
  • 5
0
votes
0 answers

Unable to locate publishable resources error using ParsedownServiceProvider

I am using the Parsedown for Laravel library and have installed using composer with the following command: composer require parsedown/laravel I'd like to set line breaks enabled to true and am following the documentation…
cinameng
  • 313
  • 4
  • 14
0
votes
1 answer

how to have html tags in laravel template using vue correctly interpreted?

I want to display text that uses markdow markup in a vue in laravel8 inertia vue. I know how to convert it in a blade template with {!!Markdown($post->body, ['config' => 'default']) !!} but it doesn't work in vue templates. In order to work this…
Meaulnes
  • 357
  • 6
  • 20
0
votes
1 answer

Can't get ParseDown to parse contents of a file

I am fairly new to PHP. I am trying to get my code to read the content of a Markdown file based on the content of GET attribute "pgid", and then output it. This: print Parsedown::instance()->text("Testing *Markdown* with **Parsedown**") results in…
0
votes
1 answer

Parsedown: get all image links

Is it possible to get all image links parsed by Parsedown? I'm considering something like: $Parsedown = new Parsedown(); $file = file_get_contents('filename.txt'); echo $Parsedown->text($file); #…
Mark Messa
  • 440
  • 4
  • 22
0
votes
1 answer

Empty newlines not show up on preview using parsedown and codeigniter

I am using parsedown and codeigniter. On my textarea if I have added a few empty lines they do not show up in preview. It only adds one \n in preview box As shown in this image Note: preview is the bottom box in image As you can see in the top box…
user4419336
0
votes
0 answers

Parsedown Escape Broken

setMarkUpEscaped is not working. Example of code $parsedown = new Parsedown(); $parsedown->setMarkupEscaped(true)->text($PostMBody); PostMBody is just a textarea, formatted like so: $PostMBody =…
Mazux2
  • 39
  • 6
0
votes
2 answers

Convert escaped less than sign inside pre tags

I'm using HTMLPurifier to escape characters within my site. Effectively turning all < and > into > and < as it should. I also want to display code within the site, but when placing code onto the site using
...
, instead…
0
votes
1 answer

Strange behaviour when rendering vtiger text fields with markdown: Wrong indent of item lists

I experienced a very strange behaviour: I wrote a custom function for PDF-Maker that sends the text of a custom field through Markdown (I used Parsedown). (The idea is that we can easily do some simple formatting in text fields in vtiger where we…
Peter T.
  • 2,927
  • 5
  • 33
  • 40
0
votes
1 answer

Literate PHP to test examples in README

I'd like to include the examples from my README.md in my testsuite. So I can be sure that all examples still work and I don't need to write the same examples again as PHPUnit test cases. Has anybody already written support for this?
Thomas Koch
  • 2,833
  • 2
  • 28
  • 36
-1
votes
1 answer

How to parse PHP in HTML without opening PHP?

With some frameworks you can have a HTML page with PHP inside it without opening PHP. Example:

{{title}}


{{content}} So where the value between {{}} defines what needs to…
Tom
  • 606
  • 7
  • 28
1
2