定制 phile/inline-image 二次开发

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

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

phile/inline-image

Composer 安装命令:

composer require phile/inline-image

包简介

A plugin take an image name and generate a wrapped image tag.

README 文档

README

A plugin for Phile to take an image name and generate a wrapped image tag.

1.1 Installation (composer)

php composer.phar require phile/inline-image:*

1.2 Installation (Download)

  • Install the latest version of Phile
  • Clone this repo into plugins/phile/inlineImage

2. Activation

After you have installed the plugin. You need to add the following line to your config.php file:

$config['plugins']['phile\\inlineImage'] = array('active' => true);

Usage

Some example markdown input:

## This is a Sub Page

This is page.md in the "sub" folder.

icon.png

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

This is what will be output. You can see that icon.png was wrapped with some HTML:

<h2>This is a Sub Page</h2>
<p>This is page.md in the "sub" folder.</p>
<p class="content-image">
  <img src="http://localhost:8888/phile/content/images/icon.png">
</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>

Config

This is the default config.php file. It explains what each key => value does.

return array(
  'images_dir' => 'content/images/', // the folder where your images exist
  'wrap_element' => 'p', // the element to wrap the img tag in
  'wrap_class' => 'content-image' // the class to apply to the wrap element
  );

You can see how the plugin applies the config data to the HTML output.

The images_dir should be relative to the root of the Phile installation (the constant ROOT_DIR will contain your root path).

统计信息

  • 总下载量: 107
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固