Skip to content

yansongda/laravel-parsehtml

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 

Laravel-Parsehtml

Scrutinizer Code Quality Build Status Latest Stable Version Total Downloads Latest Unstable Version License

This Package depends on league/html-to-markdown

Installation

$ composer require yansongda/laravel-parsehtml

Add service provider

<?php

Yansongda\LaravelParsehtml\ParsehtmlServiceProvider::class,

Add alias

<?php

'LaravelParsehtml' => Yansongda\LaravelParsehtml\Facades\Parsehtml::class,

Config(OPTION)

$ php artisan vendor:publish --provider="Yansongda\\LaravelParsehtml\\ParsehtmlServiceProvider" --tag=laravel-html-config
config desc
strip_tags strip HTML tags that don't have a Markdown equivalent
remove_nodes strip tags and their content
italic_style
bold_style
hard_break
header_style atx/etx

Reference: league/html-to-markdown

Usage

Using blade

<?php

@parsehtml('<h2>blablabla</h2>');

Using Helper

<?php

{{ parsehtml('<h2>blablabla</h2>') }}

License

MIT

About

Convert Html To Markdown With Laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages