
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
editorjs-laravel-picker
Advanced tools
Laravel Picker tool for Editor.js.
This tool allows you to display a modal of API-driven items from your Laravel application to search and add.
I have not updated the tests from the original project I forked, there is some cleanup that should also be done. Ideally Id like to find a way to pass in the toolbar/toolbox title so it can be custom via config.
This does require an API endpoint to fetch data. While this is meant for local API calls you could use this with any API endpoint if it returns the correct payloads.
Get the package
$ npm i --save-dev editorjs-laravel-picker
Include module at your application
import LaravelPicker from 'editorjs-laravel-picker';
Add a new Tool to the tools property of the Editor.js initial config.
const editor = EditorJS({
tools: {
picker: {
class: LaravelPicker,
inlineToolbar: true,
config: {
toolboxTitle: 'Documents',
api: {
endpoint: 'https://example.com/api/v1/documents',
search_param: 'term',
results_key: 'items',
}
}
}
}
});
| Field | Type | Description |
|---|---|---|
| api | {endpoint: string} | Config for API. Contains 1 field: endpoint: API Endpoint URL. |
None
| Field | Type | Description |
|---|---|---|
| url | string | Item's url |
| name | string | Item's name |
| type | string | Item's type |
| image | string | Item's image |
| summary | string | Item's summary |
| size | string | Item's size |
API Item Examples
{
"type" : "item",
"data" : {
"file" : {
"url" : "https://example.com/foobar",
"name": "Foobar",
"type": "link",
"image": "https://ui-avatars.com/api/?name=Link&color=7F9CF5&background=EBF4FF",
"summary": "A sample page url",
"size": false,
},
"title": "Foobar"
}
}
{
"type" : "item",
"data" : {
"file": {
"url" : "https://example.com/storage/files/project.pdf",
"name": "Project.pdf",
"type": "file",
"image": "https://ui-avatars.com/api/?name=PDF&color=7F9CF5&background=EBF4FF",
"summary": false,
"size": "106.9 Kib",
},
"title": "Project.pdf"
}
}
Development mode
$ yarn build:dev
Production release
$ yarn build
dist/bundle.jsRun tests
$ yarn test
We welcome everyone to contribute. Make sure you have read the CODE_OF_CONDUCT before.
For information on how to contribute, please refer to our CONTRIBUTING guide.
Features and bug fixes are listed in the CHANGELOG file.
This library is licensed under an MIT license. See LICENSE for details.
Big thanks to https://github.com/kommitters/editorjs-inline-image I copied and modified their project to create this one as it was close to what I needed. You can find me at https://codypchristian.com and https://eruditestudios.com
FAQs
Laravel Picker tool for editorjs
We found that editorjs-laravel-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.