texnixe / kirby3-spreadsheet
Kirby 3 插件,将电子表格文件作为表格包含在 Kirby textarea 字段中
1.2.0
2020-01-26 18:19 UTC
Requires
- getkirby/composer-installer: ^1.1
- nuovo/spreadsheet-reader: ^0.5.11
Requires (Dev)
- nunomaduro/phpinsights: ^1.9
- phpunit/phpunit: ^8
This package is auto-updated.
Last update: 2024-09-13 06:18:59 UTC
README
版本 1.0.0
此插件为 Kirby 3 提供了一个 KirbyTag,允许您在 textarea 字段中包含来自电子表格(Excel 或 CSV 文件)的表格。
安装
下载
下载文件 并将其放置在 site/plugins/kirby-spreadsheet
中。
Kirby CLI
通过 Kirby 的 命令行界面 安装
$ kirby plugin:install texnixe/kirby-spreadsheet
要更新插件,请运行
$ kirby plugin:update texnixe/kirby-spreadsheet
Git Submodule
您可以将 Kirby Spreadsheet 插件作为 Git 子模块添加。
$ cd your/project/root
$ git submodule add https://github.com/texnixe/kirby-spreadsheet.git site/plugins/kirby-spreadsheet
$ git submodule update --init --recursive
$ git commit -am "Add Kirby Spreadsheet"
运行以下命令以更新插件
$ cd your/project/root
$ git submodule foreach git checkout master
$ git submodule foreach git pull
$ git commit -am "Update submodules"
$ git submodule update --init --recursive
如何使用
将标签插入到 textarea 字段中。
示例:
(spreadsheet: pricelist.xlxs class: pricelist)
选项
class
您希望用于表格的类。如果没有给出类,则默认类为 'kirby-spreadsheet'。您可以在您的 config.php
中设置不同的默认类
'texnixe.spreadsheet.tableClass' => 'kirby-spreadsheet'
header
如果表格不包含标题,则设置为 false
,默认为 true
(spreadsheet: pricelist.xlxs header: false)
sheet
可选,工作表的名称。
(spreadsheet: pricelist.xlsx sheet: Table1)
许可
Kirby Spreadsheet 是开源软件,根据 MIT 许可证授权。
版权 © 日期 Sonja Broda info@texniq.de https://sonjabroda.com