All Projects → spatie → laravel-markdown

spatie / laravel-markdown

Licence: MIT License
A highly configurable markdown renderer and Blade component for Laravel

Programming Languages

PHP
23972 projects - #3 most used programming language
Blade
752 projects

Projects that are alternatives of or similar to laravel-markdown

Highlightjs Line Numbers.js
Line numbering plugin for Highlight.js
Stars: ✭ 323 (+103.14%)
Mutual labels:  code, highlight
reveal-code-focus
A Reveal.js plugin that allows focusing on specific lines of code blocks.
Stars: ✭ 108 (-32.08%)
Mutual labels:  code, highlight
CodeEditorView
Code Editor UITextView
Stars: ✭ 20 (-87.42%)
Mutual labels:  code, highlight
Hacktoberfest2020
Repository for first timers to get started in Open Source Contributions
Stars: ✭ 44 (-72.33%)
Mutual labels:  code
ml4se
A curated list of papers, theses, datasets, and tools related to the application of Machine Learning for Software Engineering
Stars: ✭ 46 (-71.07%)
Mutual labels:  code
Awesome-Deepfakes-Detection
A list of tools, papers and code related to Deepfake Detection.
Stars: ✭ 30 (-81.13%)
Mutual labels:  code
lowcode
React Lowcode - prototype, develop and maintain internal apps easier
Stars: ✭ 32 (-79.87%)
Mutual labels:  code
Abracadabra
A truly plug 'n' play solution for securing your code.
Stars: ✭ 12 (-92.45%)
Mutual labels:  code
markee
Visual text selection
Stars: ✭ 22 (-86.16%)
Mutual labels:  highlight
CodeAndQuestsEveryDay
Regular research on the Quest for developers.
Stars: ✭ 27 (-83.02%)
Mutual labels:  code
algoexpert-data-structures-algorithms
A collection of solutions for all problem statements on the AlgoExpert Coding Interview platform.
Stars: ✭ 134 (-15.72%)
Mutual labels:  code
awesome-ecommerce
Collect and develop Open Source or Free Projects for building ecommerce platform easy and fast and free
Stars: ✭ 39 (-75.47%)
Mutual labels:  code
BCN3DSigma-Firmware
Custom Marlin version for the brand new BCN3D Sigma from BCN3D Technologies
Stars: ✭ 81 (-49.06%)
Mutual labels:  code
react-native-sms-user-consent
React Native wrapper for Android's SMS User Consent API, ready to use in React Native apps with minimum effort.
Stars: ✭ 45 (-71.7%)
Mutual labels:  code
BlazorMonaco
Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
Stars: ✭ 151 (-5.03%)
Mutual labels:  code
yode
Yode - Focused Code Editing
Stars: ✭ 28 (-82.39%)
Mutual labels:  code
SharpLoader
🔮 [C#] Source code randomizer and compiler
Stars: ✭ 36 (-77.36%)
Mutual labels:  code
remark-highlight.js
Legacy plugin to highlight code blocks with highlight.js — please use `rehype-highlight` instead
Stars: ✭ 58 (-63.52%)
Mutual labels:  highlight
larapos
Laravel Point of sale with invoice full source code free download pos apps.
Stars: ✭ 38 (-76.1%)
Mutual labels:  code
riblet-sample
A sample to represent Uber Riblets design pattern using Swift.
Stars: ✭ 42 (-73.58%)
Mutual labels:  code

A highly configurable markdown renderer and Blade component for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package contains:

  • a Blade component that can render markdown
  • a highly configurable class that you can use to render markdown

Let's start with an example of the provided x-markdown Blade component. This chunk of markdown...

<x-markdown>
# My title

This is a [link to our website](https://spatie.be)

```php
echo 'Hello world';
```
</x-markdown>

... will be converted by to component to this chunk of HTML:

<div>
    <h1 id="my-title">My title</h1>
    <p>This is a <a href="https://spatie.be">link to our website</a></p>
    <pre class="shiki" style="background-color: #fff"><code><span class="line"><span
        style="color: #005CC5">echo</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;Hello world&#39;</span><span
        style="color: #24292E">;</span></span>
<span class="line"></span></code></pre>
</div>

You can also programmatically render HTML.

// by resolving the class out of the container all the options
// in the config file will be used.

app(Spatie\LaravelMarkdown\MarkdownRenderer::class)->toHtml($markdown);

Out of the box, the x-markdown component and MarkdownRenderer can:

  • highlight code blocks correctly (via Shiki PHP) for 100+ languages, including PHP, JS, Blade, and many more.
  • add anchor links to headings
  • cache results to increase performance

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Documentation

You can find installation instructions and detailed instructions on how to use this package at the dedicated documentation site.

Related packages

If you only need the league/commonmark extension to highlight code, head over to spatie/commonmark-shiki-highlighter.

In case you don't need the markdown support, but want to highlight code directly, take a look at spatie/shiki-php.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

Alternatives

If you don't want to install and handle Shiki yourself, take a look at Torchlight, which can highlight your code with minimal setup.

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].