|
|
4 years ago | |
|---|---|---|
| .. | ||
| src | 3848c5e95b rename plugin dir | 4 years ago |
| .eslintignore | 1bdb9a077d organize packages | 4 years ago |
| README.md | 3848c5e95b rename plugin dir | 4 years ago |
| index.js | 3848c5e95b rename plugin dir | 4 years ago |
| package.json | 1bdb9a077d organize packages | 4 years ago |
install plugin
yarn add growi-plugin-attachment-refs
yarn add -D react-images@1.0.0 react-motion
build client app (see official documents)
$ref tag$ref(file.txt)
$ref(file.txt, page=/somewhere/page)
$ref(5f17286fd7fbb1104fdbd111, page=/somewhere/page)
file : File name of reference file (default: the first argument)id : Attachment ID 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 filtering$refimg tag$refimg(pict.png, width=50%, alt=Pic)
$refimg(5f17286fd7fbb1104fdbd111, width=50%, alt=Pic)
file : File name of reference file (default: the first argument)id : Attachment ID of reference file (default: the first argument)width : widthheight : heightmax-width : max-widthmax-height : max-heightalt : alt text$refsimg tag$refsimg(/somewhere/page, regexp=/^.*\.png$/, max-width=200)
$refsimg(prefix=/somewhere, grid=autofill, grid-gap=1px)
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 : width
width=200px, width=50%height : height
height=100pxmax-width : max-width
max-width=200px, max-width=50%max-height : max-height
max-height=100pxdisplay : display property for image (use display: block when undefined)
grid option is set.grid : Grid layout settings
autofill : Grid layout with auto filling with 64px tracksautofill-xs : Grid layout with auto filling with 32px tracksautofill-sm : Grid layout with auto filling with 48px tracksautofill-md : Grid layout with auto filling with 64px tracksautofill-lg : Grid layout with auto filling with 128px tracksautofill-xl : Grid layout with auto filling with 192px trackscol-2 : Grid layout with 2 columnscol-3 : Grid layout with 3 columnscol-4 : Grid layout with 4 columnscol-5 : Grid layout with 5 columnscol-6 : Grid layout with 6 columnsgrid-gap : Grid gap
grid-gap=1pxno-carousel : Omit carousel function and just show images$gallery tagShort-hand for $refsimg(grid=col4, grid-gap=1px).
$gallery(prefix=/somewhere/page)
See the options of refsimg
format option


