DEV Community

STNDC
STNDC

Posted on • Edited on

1

PHP miniMarkdown

miniMakdown is a library written in PHP. It's simple markup that makes it easy to add formatting, links, and images to plain text.

miniMarkdown

Use function minimarkdown()

<?php

include 'miniMarkdown.php';

$h1 = '# h1 Text';
echo minimarkdown($h1);

?>
Enter fullscreen mode Exit fullscreen mode

Headings

To create a heading, add # symbols before your heading text. The number of # you use will determine the hierarchy level and typeface size of the heading.

# H1
## H2
### H3
Enter fullscreen mode Exit fullscreen mode

Styling text

Style    |  Sintaxis    | Example
---------------------------------------------------
bold     | ** **        | `**This is bold text**`
italic   | _ _          | `_This is italic text_`
positive | ++ ++        | `++This is positive text++`
negative | -- --        | `--This is negative text--`
Enter fullscreen mode Exit fullscreen mode

Code fromat

To format code or text into its own distinct block, use backticks.

`Code format`
Enter fullscreen mode Exit fullscreen mode

Link

You can create an inline link by wrapping link text in brackets [ ], and then wrapping the URL in parentheses ( ).

[Google](https://www.google.com)
Enter fullscreen mode Exit fullscreen mode

Image

You can display an image by adding ! and wrapping the alt text in [ ]. Alt text is a short text equivalent of the information in the image. Then, wrap the link for the image in parentheses ().

![Alt](https://www.google.com/intl/en_ALL/images/logo.gif)
Enter fullscreen mode Exit fullscreen mode

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay