定制 cohensive/markdown 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cohensive/markdown

最新稳定版本:4.0.0

Composer 安装命令:

composer require cohensive/markdown

包简介

PHP Markdown variant for Laravel 4.

README 文档

README

This is not a canonical Markdown version. This variant contains several differences:

  1. One line break will result in a <br /> tag - just like in Github Markdown.
  2. Underscores (_) in the middle of the word won't add italics or bold stylings.
  3. Grave character (~ also known as tilde) will result in <s> tag usually used to add line-through or strike-through styling.
  4. Double grave character will result in <del> tag wrapping.

Installation

Add following require to your composer.json file:

	// For Laravel 4.1.x+
	"cohensive/markdown": "dev-master"
	// OR for Laravel 4.0.x
	"cohensive/markdown": "4.0.0"

Then run composer install or composer update to download it and autoload.

In providers array you need to add new package:

'providers' => array(

	//...
	'Cohensive\Markdown\MarkdownServiceProvider',
	//...

)

In aliases:

'aliases' => array(

	//...
	'Markdown' => 'Cohensive\Markdown\Facades\Markdown'
	//...

)

And after all that, we need to add config file, containing several options for Markdown.

	php artisan config:publish cohensive/markdown

Usage

	Markdown::transform('Hello **World**');

Laravel 5

This package won't be supporting Laravel 5 version. Use CommonMark.

统计信息

  • 总下载量: 12.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2013-09-07