How to parse markdown in PHP to html with CommonMark

preview_player
Показать описание
How to parse markdown in PHP to html with CommonMark. (see shortcuts below to key points) Adam Culp of Beachcasts php programming videos shares how to use the League CommonMark package in PHP to parse markdown to html.

Please * LIKE, COMMENT, AND SUBSCRIBE * - and share with others!

Key Topics:
- Parsing markdown to html
- Using League CommonMark package
- Using Composer to add packages

Errata:
01:09 I use "markup" when I intended to say "markdown"
Let me know if you notice anything that should be errata

Associated Links:

Timeline:
00:00 Video Intro
00:55 The backstory of why I needed to parse markdown
02:04 Introduction to CommonMark
03:38 Run Composer update to pull in new dependencies
04:05 Run the PHP built-in web server for local development
05:50 Add instantiation of CommonMarkConverter
06:20 Make sure Import statement is also added
06:46 Add object to viewModel to be passed to the View
07:35 I talk briefly about nl2br() PHP function
08:27 Use the CommonMark convertToHtml() function

Other Beachcasts videos you might find interesting:

Help through referrals:

#markdown #commonmark #beachcasts
Рекомендации по теме
Комментарии
Автор

Could you make an update? CommonMark 2.0 completely changed how it works

mahipasarkar
join shbcf.ru