|
|
6 years ago | |
|---|---|---|
| .. | ||
| resource | 4850c3878b update docs | 4 years ago |
| src | 95646bc91d render message when attachments is empty | 4 years ago |
| .editorconfig | 0904cd50be init | 4 years ago |
| .eslintignore | 5ac04219a9 add skelton files | 4 years ago |
| .eslintrc.js | 5ac04219a9 add skelton files | 4 years ago |
| .gitignore | 0904cd50be init | 4 years ago |
| .markdownlint.json | 0904cd50be init | 4 years ago |
| LICENSE | 0904cd50be init | 4 years ago |
| README.md | 81bda2d246 fix behavior when prefix option is not specified | 4 years ago |
| index.js | 5ac04219a9 add skelton files | 4 years ago |
| package.json | ba38b86eed upgrade libs | 4 years ago |
| yarn.lock | ba38b86eed upgrade libs | 4 years ago |
install plugin
yarn add growi-plugin-attachment-refs
build client app (see official documents)
ref tag$ref(file.txt)
$ref(file.txt, page=/somewhere/page)
file : File name of reference file (default: the first argument)page : Target page path of reference file (default: current page)refs tag$refs(/somewhere/page, regexp=/^file.*\.txt$/)
page : Target page path to search attachments (default: the first argument || current page)prefix : Page prefix to search attachmentsdepth : page depth to search attachmentsregexp : Regular Expression to retrieveformat : File format filteringrefimg tag$refimg(pict.png, width=50%, alt=Pic)
<img src="/attachment/xxxxx" width="50%" alt="Pic">
file : File name of reference file (default: the first argument)width : widthheight : heightmax-width : max-widthmax-height : max-heightalt : alt textrefsimg tag$refsimg(/somewhere/page, regexp=/^.*\.png$/, max-width=200)
<ul>
<li><img src="/attachment/xxxxx" style="max-width: 200"></li>
<li><img src="/attachment/yyyyy" style="max-width: 200"></li>
<li><img src="/attachment/zzzzz" style="max-width: 200"></li>
</ul>
page : Target page path to search attachments (default: the first argument || current page)prefix : Page prefix to search attachmentsdepth : page depth to search attachmentsregexp : Regular Expression to retrieveformat : File format filteringwidth : widthheight : heightmax-width : max-widthmax-height : max-heightlayout : How to layout images (default: block)
block : set display: blockinline-block : set display: inline-blockcol-6 : Grid layout with col-6 by Bootstrapcol-4 : Grid layout with col-4 by Bootstrapcol-3 : Grid layout with col-3 by Bootstrapcol-2 : Grid layout with col-2 by Bootstrapcol-1 : Grid layout with col-1 by Bootstrapdepth optionformat optionlayout option
