
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@rodrigoodhin/editorjs-image-gallery
Advanced tools
Image Gallery Tool is a plugin for Editor.js that's provides an Image Gallery Block and using the available options, it's possible to adapt the layout as you like.
Works only with image URLs and requires no server-side uploader.
Get the package
npm i --save-dev @rodrigoodhin/image-gallery
Include module at your application
const ImageGallery = require('@rodrigoodhin/image-gallery');
dist
from repositorydist/bundle.js
file to your page.
You can load specific version of package from jsDelivr CDN.
https://cdn.jsdelivr.net/npm/@rodrigoodhin/image-gallery@latest
Then require this script on page with Editor.js.
<script src="..."></script>
Add a new Tool to the tools
property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
imageGallery: ImageGallery,
}
...
});
This Tool has no config params
Field | Type | Description |
---|---|---|
urls | []string | image's url |
editImages | boolean | Show and hide image urls |
bkgMode | boolean | Activate/Deactivate dark mode |
layoutDefault | boolean | Set default layout |
layoutHorizontal | boolean | Set horizontal layout |
layoutSquare | boolean | Set square layout |
layoutWithGap | boolean | Set layout with gap |
layoutWithFixedSize | boolean | Set layout width fixed size |
{
"type": "imageGallery",
"data": {
"urls": [
"https://www.nawpic.com/media/2020/ocean-nawpic-15.jpg",
"https://www.nawpic.com/media/2020/ocean-nawpic-18.jpg",
"https://wallpapercave.com/wp/6L4TVMP.jpg",
"https://wallpapercave.com/wp/wp9810772.jpg",
"https://wallpapercave.com/wp/wp9121482.jpg",
"https://wallpapercave.com/wp/wp9100484.jpg",
"https://cdn.wallpapersafari.com/94/22/4H3mFp.jpg"
],
"editImages": true,
"bkgMode": false,
"layoutDefault": true,
"layoutHorizontal": false,
"layoutSquare": false,
"layoutWithGap": false,
"layoutWithFixedSize": false
}
}
FAQs
ImageGallery Tool for Editor.js
We found that @rodrigoodhin/editorjs-image-gallery demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.